Reverse reflection method, device and equipment of reduced-order flow field and storage medium
By reducing the dimensionality of the training samples of the flow field model and building a target flow field reduction model, the problem of reflection from the lowered flow field to the original flow field is solved, and efficient and accurate flow field reflection is achieved.
Patent Information
- Application Number
- CN202510503679.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-22
AI Technical Summary
The prior art is difficult to efficiently realize the reflection from the downgrade flow field to the original flow field, especially when dealing with nonlinear flow fields, and there is a lack of effective methods to complete this process.
By obtaining the training samples used to train the flow field model and performing dimensionality reduction processing, the output samples after dimensionality reduction are obtained. Then, based on these samples, the target flow field reduction method is built, the low-dimensional output prediction is used for low-dimensional output, and the weight is determined through filtering and optimization methods, and the low-dimensional output is finally reflected to the original high-dimensional space.
It realizes efficient reflection from the downgrade flow field to the original flow field, reduces the difficulty of building a model between input and output, and improves the calculation efficiency while ensuring accuracy.
Smart Images

Figure CN120030954A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computational fluid dynamics, and in particular to a method, device, equipment and storage medium for inverse mapping of a reduced-order flow field. Background Art
[0002] The uncertainty quantification of CFD (Computational Fluid Dynamics) has the characteristics of high-dimensional input, high-dimensional output and possible correlation, and has been increasingly widely used in heavy equipment engineering fields such as aerospace, energy and power, and transportation. For example, the uncertainty quantification of turbulence model coefficients needs to deal with uncertain input parameters of about 10 dimensions. The output includes not only global integral quantities such as lift and drag coefficients, but sometimes also time or space sequence responses, such as the pressure distribution on the wall in airfoil simulation. There may be certain unknown correlations between these high-dimensional responses, and some of these high-dimensional output responses are tens of dimensions, and some are even hundreds of dimensions. In particular, complex flow fields present typical multi-dimensional, correlated and strongly nonlinear characteristics, so it is necessary to model the output as a whole. Although existing modeling methods (such as artificial neural networks) can model high-dimensional output as a whole, there are many parameters to be estimated in the model, which affects the training time. Therefore, it is necessary to introduce the flow field reduction method to establish a prediction model between the model uncertainty parameters and the reduced-order flow field, and then map the reduced-order flow field response back to the original flow field to finally obtain the corresponding prediction results. The currently commonly used POD (Proper Orthogonal Decomposition) order reduction method is mostly applicable to linear flow fields. For nonlinear flow fields, it is necessary to introduce the KPOD (Kernel Proper Orthogonal Decomposition) order reduction method. However, how to efficiently realize the inverse mapping from the reduced-order flow field to the original flow field is still a problem to be solved. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a method, device, equipment and storage medium for inverse mapping of a reduced-order flow field, which can efficiently realize inverse mapping from a reduced-order flow field to an original flow field. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses a method for inverse mapping of a reduced-order flow field, comprising:
[0005] Acquire training samples for training the flow field model, and perform dimensionality reduction processing on each original output sample corresponding to each input sample in the training samples to obtain each dimensionality-reduced output sample corresponding to each input sample;
[0006] Perform flow field model training based on each of the input samples and the corresponding output samples after dimensionality reduction to obtain a corresponding target flow field reduced-order model, and input a test sample into the target flow field reduced-order model to use the target flow field reduced-order model to perform corresponding low-dimensional output prediction based on the test sample to obtain a target low-dimensional output corresponding to the test sample;
[0007] Determine each target distance between the target low-dimensional output and each of the dimensionality-reduced output samples, screen the dimensionality-reduced output samples based on the target distance to obtain corresponding first target output samples, and determine each of the original output samples corresponding to each of the first target output samples as a second target output sample;
[0008] Determine the first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization method, and determine the first weights as the second weights of the corresponding second target output samples;
[0009] The target low-dimensional output is inversely mapped based on each of the second target output samples and the corresponding second weights to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before reduction, and the target high-dimensional output corresponding to the test sample is obtained to complete the corresponding output prediction.
[0010] Optionally, performing dimensionality reduction processing on each original output sample corresponding to each input sample in the training sample to obtain each dimensionality-reduced output sample corresponding to each input sample includes:
[0011] Determine a target matrix based on each original output sample corresponding to each input sample in the training sample using a preset kernel function, and map each original output sample based on the target matrix to complete dimensionality reduction processing to obtain each reduced-dimensionality output sample corresponding to each input sample;
[0012] Among them, the preset kernel function includes Gaussian kernel function, polynomial kernel function and Sigmoid kernel function.
[0013] Optionally, the method of using a preset kernel function to determine a target matrix based on each original output sample corresponding to each input sample in the training sample, and mapping each original output sample based on the target matrix to complete dimensionality reduction processing to obtain each reduced-dimensionality output sample corresponding to each input sample includes:
[0014] Determine a first target matrix based on each original output sample corresponding to each input sample in the training samples using a preset kernel function;
[0015] Centralizing the first target matrix to obtain a second target matrix;
[0016] Performing diagonal dimension reduction processing on the second target matrix based on a preset dimension reduction dimension to determine a third target matrix;
[0017] Mapping each of the original output samples based on the third target matrix to obtain each dimensionally reduced output sample corresponding to each of the input samples;
[0018] The preset dimension reduction dimension is smaller than the number of the input samples, and the preset dimension reduction dimension is smaller than the dimension of the original output sample.
[0019] Optionally, the target flow field reduced-order model is a Kriging model built based on a preset function type; the preset function type includes a trend function and a correlation function.
[0020] Optionally, the screening the dimension-reduced output samples based on the target distance to obtain corresponding first target output samples includes:
[0021] Determine the minimum distance between the target low-dimensional output and the output sample after dimensionality reduction based on all the target distances;
[0022] Screening the output samples after dimensionality reduction based on a preset distance multiple and the minimum distance to determine a first target output sample;
[0023] The target distance corresponding to the first target output sample is less than or equal to the product of the minimum distance and the preset distance multiple, and the target distance is a Euclidean distance.
[0024] Optionally, the determining the first weights respectively corresponding to the first target output samples based on the target low-dimensional output using a preset optimization method includes:
[0025] Determine first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization function;
[0026] Among them, the first weight is the weighted weight corresponding to each first target output sample when each first target output sample meets the preset weight solution condition; the preset weight solution condition is that the difference between the weighted sum of each first target output sample and the target low-dimensional output is the smallest.
[0027] Optionally, the inverse mapping of the target low-dimensional output based on each of the second target output samples and the corresponding second weights to map the target low-dimensional output to a target high-dimensional space corresponding to the flow field model before order reduction to obtain a target high-dimensional output corresponding to the test sample includes:
[0028] Performing weighted summation on each of the second target output samples based on the second weight to obtain a corresponding weighted summation result;
[0029] The weighted summation result is determined as the inverse mapping result corresponding to the target high-dimensional space corresponding to the flow field model of the target low-dimensional output before reduction, and the inverse mapping result is determined as the target high-dimensional output corresponding to the test sample; wherein the inverse mapping result has the same dimension as the second target output sample.
[0030] In a second aspect, the present application discloses a de-mapping device for a reduced-order flow field, comprising:
[0031] A sample dimension reduction module is used to obtain training samples for training the flow field model, and perform dimension reduction processing on each original output sample corresponding to each input sample in the training sample to obtain each dimension-reduced output sample corresponding to each input sample;
[0032] A low-dimensional output acquisition module is used to perform flow field model training based on each of the input samples and the corresponding output samples after dimensionality reduction to obtain a corresponding target flow field reduced-order model, and input a test sample into the target flow field reduced-order model to use the target flow field reduced-order model to perform a corresponding low-dimensional output prediction based on the test sample to obtain a target low-dimensional output corresponding to the test sample;
[0033] A sample screening module, used to determine each target distance between the target low-dimensional output and each of the output samples after dimensionality reduction, screen the output samples after dimensionality reduction based on the target distance to obtain corresponding first target output samples, and determine each of the original output samples corresponding to each of the first target output samples as a second target output sample;
[0034] A weight determination module, configured to determine first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization method, and determine the first weights as second weights of the corresponding second target output samples;
[0035] A high-dimensional output prediction module is used to reversely map the target low-dimensional output based on each of the second target output samples and the corresponding second weights, so as to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before reduction, and obtain the target high-dimensional output corresponding to the test sample to complete the corresponding output prediction.
[0036] In a third aspect, the present application discloses an electronic device, including:
[0037] Memory, used to store computer programs;
[0038] The processor is used to execute the computer program to implement the aforementioned inverse mapping method of the reduced-order flow field.
[0039] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned inverse mapping method of a reduced-order flow field.
[0040] In the present application, when realizing the inverse mapping from the reduced-order flow field to the original flow field, training samples for training the flow field model are obtained, and the original output samples corresponding to the input samples in the training samples are subjected to dimensionality reduction processing to obtain the reduced-dimensional output samples corresponding to the input samples; the flow field model is trained based on the input samples and the corresponding reduced-dimensional output samples to obtain the corresponding target flow field reduced-order model, and the test sample is input into the target flow field reduced-order model to use the target flow field reduced-order model to perform the corresponding low-dimensional output prediction based on the test sample to obtain the target low-dimensional output corresponding to the test sample; the target distances between the target low-dimensional output and the reduced-dimensional output samples are determined based on the The target distance is used to screen the output samples after dimensionality reduction to obtain the corresponding first target output samples, and the original output samples corresponding to the first target output samples are determined as the second target output samples; the first weights corresponding to the first target output samples are determined based on the target low-dimensional output using a preset optimization method, and the first weights are determined as the second weights of the corresponding second target output samples; the target low-dimensional output is reversely mapped based on the second target output samples and the corresponding second weights to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before order reduction, and the target high-dimensional output corresponding to the test sample is obtained to complete the corresponding output prediction. It can be seen that the present application obtains the output samples after dimensionality reduction by reducing the original output samples corresponding to the known input samples, and builds the target flow field reduction model according to the known input samples and the corresponding output samples after dimensionality reduction. After the construction is completed, any new input is given to the target flow field reduction model, and the low-dimensional output corresponding to the input can be obtained, thereby achieving the order reduction of the original flow field and reducing the difficulty of constructing the input-output model. After the test sample is input into the target flow field reduction model to obtain the target low-dimensional output, the second target output sample that is closer to the target low-dimensional output can be screened out according to the target distances between the target low-dimensional output and each output sample after dimensionality reduction. Finally, the target low-dimensional output is back-mapped to the target high-dimensional space corresponding to the flow field model before reduction (that is, the original flow field) according to the second target output sample and the second weight to obtain the target high-dimensional output. At this time, the target high-dimensional output is consistent with the dimension of the original flow field, thereby efficiently realizing the back-mapping from the reduced-order flow field to the original flow field while ensuring accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 A flow chart of a reverse mapping method for a reduced-order flow field disclosed in the present application;
[0043] Figure 2 A quartile box plot of a back-mapping prediction error disclosed in the present application;
[0044] Figure 3 A schematic diagram of the structure of a reverse mapping device for a reduced-order flow field disclosed in the present application;
[0045] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Existing modeling methods (such as artificial neural networks) can model the high-dimensional output as a whole, but the model has many parameters to be estimated, which affects the training time. Therefore, it is necessary to introduce a flow field reduction method to establish a prediction model between the model's uncertain parameters and the reduced-order flow field, and then map the reduced-order flow field response back to the original flow field to finally obtain the corresponding prediction results. The currently commonly used POD reduction method is mostly suitable for linear flow fields. For nonlinear flow fields, it is necessary to introduce a KPOD reduction method. However, how to efficiently achieve the reverse mapping from the reduced-order flow field to the original flow field is still a problem to be solved. In order to solve the above-mentioned technical problems, the present application discloses a reverse mapping method for a reduced-order flow field, which can efficiently achieve the reverse mapping from the reduced-order flow field to the original flow field.
[0048] See also Figure 1 As shown, an embodiment of the present invention discloses a method for inverse mapping of a reduced-order flow field, comprising:
[0049] Step S11, obtaining training samples for training the flow field model, and performing dimensionality reduction processing on each original output sample corresponding to each input sample in the training samples to obtain each output sample after dimensionality reduction corresponding to each input sample.
[0050] In this embodiment, the training samples are sample data used to train the flow field model. After obtaining the training samples, the KPOD method can be used to obtain the reduced-dimensional output samples corresponding to the input samples. It should be noted that the flow field model to be trained in this application can be a wind tunnel flow field model used in the aircraft design process, or it can be a flow field model involved in other application scenarios, such as an atmospheric circulation model in a weather forecast scenario.
[0051] Performing dimensionality reduction processing on each original output sample corresponding to each input sample in the training sample to obtain each reduced-dimensionality output sample corresponding to each input sample. The specific process may include: using a preset kernel function to determine a target matrix based on each original output sample corresponding to each input sample in the training sample, and mapping each original output sample based on the target matrix to complete the dimensionality reduction processing to obtain each reduced-dimensionality output sample corresponding to each input sample; wherein the preset kernel function includes a Gaussian kernel function, a polynomial kernel function, and a Sigmoid kernel function.
[0052] In a specific embodiment, the specific process of obtaining the output samples after dimensionality reduction using the KPOD method includes: using a preset kernel function to determine the first target matrix based on the original output samples corresponding to each input sample in the training sample; centralizing the first target matrix to obtain the second target matrix; diagonalizing the second target matrix based on the preset dimensionality reduction dimension to determine the third target matrix; mapping each original output sample based on the third target matrix to obtain each dimensionality reduction output sample corresponding to each input sample; wherein the preset dimensionality reduction dimension is less than the number of the input samples, and the preset dimensionality reduction dimension is less than the dimension of the original output sample. Specifically, if the input sample in the training sample is called X, and the original output sample is Y, the corresponding Gramm matrix G, that is, the first target matrix, is obtained by using the kernel function according to Y, and each element in the matrix G satisfies the following conditions:
[0053] ;
[0054] in Represents the first Line The elements of the column, represents the kernel function, and Respectively represent and The output of the training samples, represents the kernel function parameters, and All represent the training sample numbers; Represents an exponential function with the natural constant e as base.
[0055] Then the Gramm matrix G is centralized, and we have:
[0056] ;
[0057] in represents the centralized Gramm matrix, which is also the second target matrix. represents the number of training samples, Indicates that all elements are 1 OK A matrix of columns;
[0058] Then the matrix Perform diagonal dimension reduction, then we have:
[0059] ;
[0060] in is the diagonal matrix of eigenvalues, is the eigenvector matrix, yes The transposed matrix of Indicates the number of training samples; yes eigenvalues, and there are ; Take the eigenvector matrix Before Column, denoted as ; It is understandable that the dimension of the training sample output after dimensionality reduction is is much smaller than the dimension of the original training sample output, and It is also much smaller than the number of training samples. , and needs to satisfy the following formula:
[0061] ;
[0062] in is the accuracy set according to actual needs. After dimensionality reduction, we can get:
[0063] ;
[0064] in, Representation Matrix The transpose of training samples Mapping to low-dimensional space is:
[0065] ;
[0066] ;
[0067] Among them, the third target matrix Z ( OK The matrix of columns represents the low-dimensional output of the training sample after dimensionality reduction, that is, the output sample after dimensionality reduction. represents the dimension of the training sample output after dimensionality reduction, represents the number of training samples, It is G's List, yes No. List, Indicates that all elements are 1 The column vector of rows, for The transpose of Indicates that all elements are 1 OK A matrix of columns, Indicates the number of training samples.
[0068] Step S12: training a flow field model based on each of the input samples and the corresponding output samples after dimensionality reduction to obtain a corresponding target flow field reduced-order model, and inputting a test sample into the target flow field reduced-order model to use the target flow field reduced-order model to perform corresponding low-dimensional output prediction based on the test sample to obtain a target low-dimensional output corresponding to the test sample.
[0069] In this embodiment, after using each original output sample to obtain each reduced-dimensional output sample corresponding to each input sample, these sample data can be used to train the flow field model to obtain the corresponding target flow field reduced-order model, and then the test sample (a new set of input samples) can be input into the target flow field reduced-order model to obtain the low-dimensional target output corresponding to the test sample. In a specific embodiment, the target flow field reduced-order model is a Kriging model built based on a preset function type, and the preset function type includes a quadratic trend function and a Gaussian correlation function. It should be pointed out that the preset function type is not immutable, and the preset function type also includes other trend functions and related functions such as constants, linear trend functions, exponential correlation functions, etc., and the trend function and related function can be selected according to actual needs to build the Kriging model. In addition, since the output sample after dimensionality reduction has fewer dimensions than the original output sample, compared with the conventional method of overall modeling of the input sample and the original output sample, the target flow field reduced-order model has fewer parameters to be estimated, the training time is shorter, and the modeling difficulty is lower.
[0070] Step S13, determine each target distance between the target low-dimensional output and each of the reduced-dimensionality output samples, screen the reduced-dimensionality output samples based on the target distance to obtain corresponding first target output samples, and determine each of the original output samples corresponding to each of the first target output samples as the second target output samples.
[0071] In this embodiment, the target low-dimensional output is the low-dimensional output prediction result of the target flow field reduction model obtained in the above steps for the test sample, and the target distance between the target low-dimensional output and each reduced-dimensional output sample can be the Euclidean distance between them. After all target distances are obtained, the minimum distance between the target low-dimensional output and the reduced-dimensional output sample is determined from all target distances according to the size relationship of each target distance, and then the reduced-dimensional output sample is screened based on the preset distance multiple and the minimum distance to determine the first target output sample, and the target distance corresponding to the first target output sample is less than or equal to the product of the minimum distance and the preset distance multiple, thereby filtering out the reduced-dimensional output sample far from the target low-dimensional output, improving the accuracy of the subsequent inverse mapping result, and reducing the error. The preset distance multiple N can be selected according to actual needs, such as selecting N=10, etc. After the first target output sample is screened out, the original output samples corresponding to each first target output sample can be determined according to the corresponding relationship between the reduced-dimensional output sample and the original output sample, and the screened original output samples are determined as the second target output sample.
[0072] Step S14: Determine the first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization method, and determine the first weights as the second weights of the corresponding second target output samples.
[0073] In this embodiment, after determining the first target output sample and the second target output sample, it is necessary to use a preset optimization method to determine the first weights corresponding to each first target output sample based on the target low-dimensional output, which may specifically include: using a preset optimization function to determine the first weights corresponding to each first target output sample based on the target low-dimensional output. Wherein, the first weight is the weighted weight corresponding to each first target output sample when each first target output sample meets the preset weight solution condition. The preset weight solution condition is that the difference between the weighted sum of each first target output sample and the target low-dimensional output is the smallest. Specifically, the preset optimization function may be the fmincon function in Matlab, which is an optimization tool for solving the minimum value of a constrained nonlinear multivariable function. When the fmincon function is used, the difference between the weighted sum of the target low-dimensional output and the selected first target output sample (that is, the low-dimensional output corresponding to the training sample) is the smallest. After obtaining the first weight, the first weight corresponding to each first target output sample can be determined as the second weight corresponding to the corresponding second target output sample according to the corresponding relationship between the first weight and the first target output sample, and the corresponding relationship between the first target output sample and the second target output sample.
[0074] Step S15, based on each of the second target output samples and the corresponding second weights, the target low-dimensional output is de-mapped to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before reduction, and the target high-dimensional output corresponding to the test sample is obtained to complete the corresponding output prediction.
[0075] In this embodiment, after determining the second weight corresponding to each second target output sample, the target low-dimensional output can be reverse mapped based on each second target output sample and the corresponding second weight, so as to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before order reduction, and obtain the target high-dimensional output corresponding to the test sample, which can specifically include: weighted summing each second target output sample based on the second weight to obtain the corresponding weighted summation result; determining the weighted summation result as the reverse mapping result corresponding to the target high-dimensional space corresponding to the flow field model before order reduction of the target low-dimensional output, and determining the reverse mapping result as the target high-dimensional output corresponding to the test sample. It can be understood that since the reverse mapping result is obtained by weighted summing the second target output sample (that is, a part of the original output sample), the reverse mapping result has the same dimension as the second target output sample, that is, the target high-dimensional output corresponding to the test sample can be obtained through the aforementioned process, and the corresponding output prediction is completed.
[0076] In this embodiment, Figure 2 The quartile box plot corresponding to method 1 in the above example is the prediction error obtained by using the inverse mapping method of the reduced-order flow field disclosed in this embodiment to predict the high-dimensional output corresponding to the test sample. Method 2 uses the commonly used POD reduction method to predict the high-dimensional output corresponding to the test sample. Method 3 uses the KPOD method of the Voronoi diagram to predict the high-dimensional output corresponding to the test sample. Figure 2 By comparing the corresponding prediction errors of each method, it can be seen that in the problem of flow field reduction of high-dimensional related responses, compared with the commonly used POD reduction method and the method of using the Voronoi diagram to screen the output weights of some training samples for KPOD inverse mapping, the prediction error of this embodiment for predicting the high-dimensional output corresponding to the test sample is smaller and more accurate. In practical applications, after the target flow field reduction model (that is, the prediction model between the model uncertain parameters and the reduced-order flow field) is constructed using this embodiment, parameters are input into the target flow field reduction model according to actual needs to obtain the corresponding flow field response, and the high-dimensional output response corresponding to the flow field response in the original flow field is solved using this embodiment, thereby completing the corresponding output prediction.
[0077] This embodiment is applicable to uncertainty quantification work in fields with high-dimensional input, high-dimensional output and possible correlation characteristics, such as wind tunnel testing or weather forecasting.
[0078] It can be seen that the present application obtains the output samples after dimensionality reduction by reducing the original output samples corresponding to the known input samples, and builds the target flow field reduction model according to the known input samples and the corresponding output samples after dimensionality reduction. After the construction is completed, any new input is given to the target flow field reduction model, and the low-dimensional output corresponding to the input can be obtained, thereby achieving the reduction of the original flow field and reducing the difficulty of building the model between input and output. After the test sample is input into the target flow field reduction model to obtain the target low-dimensional output, the second target output sample with a closer distance to the target low-dimensional output can be screened out according to the target distances between the target low-dimensional output and each output sample after dimensionality reduction, and finally the target low-dimensional output is reversely mapped to the target high-dimensional space corresponding to the flow field model before reduction (that is, the original flow field) according to the second target output sample and the second weight, and the target high-dimensional output is obtained. At this time, the target high-dimensional output is consistent with the dimension of the original flow field, thereby efficiently realizing the reverse mapping from the reduced-order flow field to the original flow field while ensuring accuracy.
[0079] Based on the above embodiment, the present application discloses a method for inverse mapping of a reduced-order flow field, which can efficiently achieve inverse mapping from a reduced-order flow field to an original flow field while ensuring accuracy. Next, the inverse mapping process of a specific reduced-order flow field will be described.
[0080] Taking the one-dimensional advection diffusion problem as an example, the research example is as follows:
[0081] ;
[0082] The input parameters are , , , Can refer to a location, Can refer to time, Can refer to the flow rate. The physical quantity to be determined is It can be in Time location The concentration or temperature at the location. Assume that the diffusion coefficient ,speed , for exist The first-order partial derivative in the direction, express exist The first-order partial derivative in the direction, for exist The second-order partial derivative in the direction. The space is discretized into 2000 uniform intervals, then the sample output is The dimension of is 1999 (excluding the boundary position). The specific process of implementing the inverse mapping of the reduced-order flow field for this example is as follows:
[0083] First, obtain the training samples and record the training sample input as (in ),in arrive Can take speed ,time ; arrive Can take speed ,time ; arrive Can take speed , and you can set the time value to ; The output of the training sample is recorded as (in ). The KPOD method is used to obtain the low-dimensional output after dimensionality reduction. (in ), superscript Indicates that the obtained matrix is a vertical column matrix, where the kernel function selects the Gaussian kernel function, and the kernel function parameter Take 0.01, Take 0.99.
[0084] Then create a training sample input With low-dimensional output The Kriging model between , given 50 test sample inputs denoted as ,in , you can get the speed ,time ; The test sample output is recorded as , . Based on the Kriging model prediction, the corresponding low-dimensional output is given (in ), where the Kriging model selects the quadratic trend function and the Gaussian correlation function, is the output dimension of the low-dimensional output.
[0085] Then calculate the The low-dimensional output of the test samples , With all training samples low-dimensional output The Euclidean distance between , take the minimum value of all distances, recorded as , filter out The low-dimensional output of the training samples ,in , the corresponding high-dimensional output is , , is the number of low-dimensional outputs filtered out.
[0086] Finally, the fmincon function in Matlab is used to obtain the The low-dimensional output selected by the test samples Weight , and use this as the weight of its corresponding high-dimensional output, and then the high-dimensional output of the selected training sample Weighted summation, so as to use method 1 to get the given The predicted output for the test sample is:
[0087] ;
[0088] in, .
[0089] At the same time, the POD method (method 2) is used to obtain the prediction output of the given 50 test samples , where the trend function and correlation function of the Kriging model are consistent with the selection of the Kriging model in KPOD, and the POD reduction criterion is consistent with KPOD ( 0.99 is taken); in addition, based on the Voronoi diagram method (method three), the first Test samples The number of training samples in the polygon and adjacent polygons Low-dimensional output and its corresponding high-dimensional output , and use the fmincon function in Matlab to obtain the low-dimensional output Weight , and use this as the weight of its corresponding high-dimensional output, and then select the high-dimensional output Weighted summation gives the given The predicted output for the test sample is:
[0090] ;
[0091] in, , , , .
[0092] Through the above process, we can obtain that the prediction error of the 50 test samples using method 1 is:
[0093] ;
[0094] The prediction error using method 2 is:
[0095] ;
[0096] The prediction error using method 3 is:
[0097] ;
[0098] in, .
[0099] Figure 2 The quartile box plots of the prediction errors of the three methods are shown in Figure 1. The horizontal axis shows the method of the present application, the second method shows the POD method, and the third method shows the method of weighted inverse mapping after filtering some low-dimensional outputs based on the Voronoi diagram. The vertical axis shows the prediction error. Figure 2 It can be seen that compared with the POD method and the method based on Voronoi diagram screening, the method developed in this paper has the smallest prediction error and higher accuracy.
[0100] It can be seen that the present application obtains the output samples after dimensionality reduction by reducing the dimensions of the original output samples corresponding to the known input samples, and builds the target flow field reduction model according to the known input samples and the corresponding output samples after dimensionality reduction. After the construction is completed, any new input is given to the target flow field reduction model, and the low-dimensional output corresponding to the input can be obtained, thereby achieving the reduction of the original flow field and reducing the difficulty of building the model between input and output. After the test sample is input into the target flow field reduction model to obtain the target low-dimensional output, the second target output sample with a closer distance to the target low-dimensional output can be screened out according to the target distances between the target low-dimensional output and each output sample after dimensionality reduction, and finally the target low-dimensional output is reversely mapped to the target high-dimensional space corresponding to the flow field model before reduction (that is, the original flow field) according to the second target output sample and the second weight, and the target high-dimensional output is obtained. At this time, the target high-dimensional output is consistent with the dimension of the original flow field, thereby efficiently realizing the reverse mapping from the reduced-order flow field to the original flow field while ensuring accuracy.
[0101] See also Figure 3 As shown, the present application discloses a reverse mapping device for a reduced-order flow field, comprising:
[0102] The sample dimension reduction module 11 is used to obtain training samples for training the flow field model, and perform dimension reduction processing on each original output sample corresponding to each input sample in the training sample to obtain each dimension-reduced output sample corresponding to each input sample;
[0103] A low-dimensional output acquisition module 12 is used to perform flow field model training based on each of the input samples and the corresponding output samples after dimensionality reduction to obtain a corresponding target flow field reduced-order model, and input a test sample into the target flow field reduced-order model to perform a corresponding low-dimensional output prediction based on the test sample using the target flow field reduced-order model to obtain a target low-dimensional output corresponding to the test sample;
[0104] A sample screening module 13 is used to determine each target distance between the target low-dimensional output and each of the dimensionality-reduced output samples, screen the dimensionality-reduced output samples based on the target distance to obtain corresponding first target output samples, and determine each of the original output samples corresponding to each of the first target output samples as a second target output sample;
[0105] A weight determination module 14 is used to determine the first weights corresponding to the first target output samples based on the target low-dimensional output by using a preset optimization method, and determine the first weights as the second weights of the corresponding second target output samples;
[0106] The high-dimensional output prediction module 15 is used to reversely map the target low-dimensional output based on each of the second target output samples and the corresponding second weights, so as to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before reduction, and obtain the target high-dimensional output corresponding to the test sample to complete the corresponding output prediction.
[0107] It can be seen that the present application obtains the output samples after dimensionality reduction by reducing the original output samples corresponding to the known input samples, and builds the target flow field reduction model according to the known input samples and the corresponding output samples after dimensionality reduction. After the construction is completed, any new input is given to the target flow field reduction model, and the low-dimensional output corresponding to the input can be obtained, thereby achieving the reduction of the original flow field and reducing the difficulty of building the model between input and output. After the test sample is input into the target flow field reduction model to obtain the target low-dimensional output, the second target output sample with a closer distance to the target low-dimensional output can be screened out according to the target distances between the target low-dimensional output and each output sample after dimensionality reduction, and finally the target low-dimensional output is reversely mapped to the target high-dimensional space corresponding to the flow field model before reduction (that is, the original flow field) according to the second target output sample and the second weight, and the target high-dimensional output is obtained. At this time, the target high-dimensional output is consistent with the dimension of the original flow field, thereby efficiently realizing the reverse mapping from the reduced-order flow field to the original flow field while ensuring accuracy.
[0108] In a specific implementation, the sample dimension reduction module 11 may specifically include:
[0109] A sample dimension reduction submodule is used to determine a target matrix based on each original output sample corresponding to each input sample in the training sample using a preset kernel function, and to map each original output sample based on the target matrix to complete the dimension reduction process, thereby obtaining each dimension-reduced output sample corresponding to each input sample;
[0110] Among them, the preset kernel function includes Gaussian kernel function, polynomial kernel function and Sigmoid kernel function.
[0111] In a specific implementation, the sample dimension reduction submodule may specifically include:
[0112] A first matrix determination unit, configured to determine a first target matrix based on each original output sample corresponding to each input sample in the training sample using a preset kernel function;
[0113] A second matrix determination unit, configured to perform centralization processing on the first target matrix to obtain a second target matrix;
[0114] A third matrix determination unit, configured to perform diagonal dimension reduction processing on the second target matrix based on a preset dimension reduction dimension to determine a third target matrix;
[0115] A sample dimension reduction unit, used for mapping each of the original output samples based on the third target matrix to obtain each dimension-reduced output sample corresponding to each of the input samples;
[0116] The preset dimension reduction dimension is smaller than the number of the input samples, and the preset dimension reduction dimension is smaller than the dimension of the original output sample.
[0117] In a specific implementation, the sample screening module 13 may specifically include:
[0118] A minimum distance determination submodule, used to determine the minimum distance between the target low-dimensional output and the output sample after dimensionality reduction based on all the target distances;
[0119] A sample screening submodule, used for screening the output samples after dimensionality reduction based on a preset distance multiple and the minimum distance to determine a first target output sample;
[0120] The target distance corresponding to the first target output sample is less than or equal to the product of the minimum distance and the preset distance multiple, and the target distance is a Euclidean distance.
[0121] In a specific implementation, the weight determination module 14 may specifically include:
[0122] A first weight determination submodule, configured to determine first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization function;
[0123] Among them, the first weight is the weighted weight corresponding to each first target output sample when each first target output sample meets the preset weight solution condition; the preset weight solution condition is that the difference between the weighted sum of each first target output sample and the target low-dimensional output is the smallest.
[0124] In a specific implementation, the high-dimensional output prediction module 15 may specifically include:
[0125] A weighted summation submodule, configured to perform weighted summation on each of the second target output samples based on the second weight to obtain a corresponding weighted summation result;
[0126] A high-dimensional output prediction submodule is used to determine the weighted summation result as the inverse mapping result corresponding to the target high-dimensional space corresponding to the flow field model of the target low-dimensional output before reduction, and determine the inverse mapping result as the target high-dimensional output corresponding to the test sample; wherein the inverse mapping result has the same dimension as the second target output sample.
[0127] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0128] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the inverse mapping method of the reduced-order flow field disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0129] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0130] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0131] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the inverse mapping method of the reduced-order flow field performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0132] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed method for inverse mapping of a reduced-order flow field is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0133] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0134] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0135] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0136] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0137] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for inverse mapping of a reduced-order flow field, characterized in that: include: Acquire training samples for training the flow field model, and perform dimensionality reduction processing on each original output sample corresponding to each input sample in the training samples to obtain each dimensionality-reduced output sample corresponding to each input sample; Perform flow field model training based on each of the input samples and the corresponding output samples after dimensionality reduction to obtain a corresponding target flow field reduced-order model, and input a test sample into the target flow field reduced-order model to use the target flow field reduced-order model to perform corresponding low-dimensional output prediction based on the test sample to obtain a target low-dimensional output corresponding to the test sample; Determine each target distance between the target low-dimensional output and each of the dimensionality-reduced output samples, screen the dimensionality-reduced output samples based on the target distance to obtain corresponding first target output samples, and determine each of the original output samples corresponding to each of the first target output samples as a second target output sample; Determine the first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization method, and determine the first weights as the second weights of the corresponding second target output samples; The target low-dimensional output is inversely mapped based on each of the second target output samples and the corresponding second weights to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before reduction, and the target high-dimensional output corresponding to the test sample is obtained to complete the corresponding output prediction.
2. The inverse mapping method of reduced-order flow field according to claim 1, characterized in that: The performing dimensionality reduction processing on each original output sample corresponding to each input sample in the training sample to obtain each dimensionality reduced output sample corresponding to each input sample includes: Determine a target matrix based on each original output sample corresponding to each input sample in the training sample using a preset kernel function, and map each original output sample based on the target matrix to complete dimensionality reduction processing to obtain each reduced-dimensionality output sample corresponding to each input sample; Among them, the preset kernel function includes Gaussian kernel function, polynomial kernel function and Sigmoid kernel function.
3. The inverse mapping method of reduced-order flow field according to claim 2, characterized in that: The method of determining a target matrix based on each original output sample corresponding to each input sample in the training sample by using a preset kernel function, and mapping each original output sample based on the target matrix to complete the dimensionality reduction process to obtain each dimensionality-reduced output sample corresponding to each input sample, includes: Determine a first target matrix based on each original output sample corresponding to each input sample in the training samples using a preset kernel function; Centralizing the first target matrix to obtain a second target matrix; Performing diagonal dimension reduction processing on the second target matrix based on a preset dimension reduction dimension to determine a third target matrix; Mapping each of the original output samples based on the third target matrix to obtain each dimensionally reduced output sample corresponding to each of the input samples; The preset dimension reduction dimension is smaller than the number of the input samples, and the preset dimension reduction dimension is smaller than the dimension of the original output sample.
4. The inverse mapping method of reduced-order flow field according to claim 1, characterized in that: The target flow field reduced-order model is a Kriging model built based on a preset function type; the preset function type includes a trend function and a correlation function.
5. The inverse mapping method of reduced-order flow field according to claim 1, characterized in that: The step of screening the dimension-reduced output samples based on the target distance to obtain corresponding first target output samples includes: Determine the minimum distance between the target low-dimensional output and the output sample after dimensionality reduction based on all the target distances; Screening the output samples after dimensionality reduction based on a preset distance multiple and the minimum distance to determine a first target output sample; The target distance corresponding to the first target output sample is less than or equal to the product of the minimum distance and the preset distance multiple, and the target distance is a Euclidean distance.
6. The inverse mapping method of reduced-order flow field according to claim 1, characterized in that: The determining the first weights respectively corresponding to the first target output samples based on the target low-dimensional output using a preset optimization method includes: Determine first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization function; Among them, the first weight is the weighted weight corresponding to each first target output sample when each first target output sample meets the preset weight solution condition; the preset weight solution condition is that the difference between the weighted sum of each first target output sample and the target low-dimensional output is the smallest.
7. The inverse mapping method of a reduced-order flow field according to any one of claims 1 to 6, characterized in that: The method of performing inverse mapping on the target low-dimensional output based on each of the second target output samples and the corresponding second weights to map the target low-dimensional output to a target high-dimensional space corresponding to the flow field model before order reduction to obtain a target high-dimensional output corresponding to the test sample includes: Performing weighted summation on each of the second target output samples based on the second weight to obtain a corresponding weighted summation result; The weighted summation result is determined as the inverse mapping result corresponding to the target high-dimensional space corresponding to the flow field model of the target low-dimensional output before reduction, and the inverse mapping result is determined as the target high-dimensional output corresponding to the test sample; wherein the inverse mapping result has the same dimension as the second target output sample.
8. A back-mapping device for a reduced-order flow field, characterized in that: include: A sample dimension reduction module is used to obtain training samples for training the flow field model, and perform dimension reduction processing on each original output sample corresponding to each input sample in the training sample to obtain each dimension-reduced output sample corresponding to each input sample; A low-dimensional output acquisition module is used to perform flow field model training based on each of the input samples and the corresponding output samples after dimensionality reduction to obtain a corresponding target flow field reduced-order model, and input a test sample into the target flow field reduced-order model to use the target flow field reduced-order model to perform a corresponding low-dimensional output prediction based on the test sample to obtain a target low-dimensional output corresponding to the test sample; A sample screening module, used to determine each target distance between the target low-dimensional output and each of the output samples after dimensionality reduction, screen the output samples after dimensionality reduction based on the target distance to obtain corresponding first target output samples, and determine each of the original output samples corresponding to each of the first target output samples as a second target output sample; A weight determination module, configured to determine first weights corresponding to the first target output samples based on the target low-dimensional output using a preset optimization method, and determine the first weights as second weights of the corresponding second target output samples; A high-dimensional output prediction module is used to reversely map the target low-dimensional output based on each of the second target output samples and the corresponding second weights, so as to map the target low-dimensional output to the target high-dimensional space corresponding to the flow field model before reduction, and obtain the target high-dimensional output corresponding to the test sample to complete the corresponding output prediction.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the inverse mapping method of the reduced-order flow field as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the inverse mapping method of the reduced-order flow field according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Flow field simulation method and device, computer equipment and storage medium
CN116822407A
Method and device for realizing rapid micro-expression recognition processing based on bidirectional optical flow, processor and computer readable storage medium thereof
CN117456578A
Project disaster warning method and system based on collaborative fusion of multi-physics monitoring data
US20230410012A1