A semi-supervised learning flow field prediction method based on Gaussian mixture model
Through the semi-supervised learning method based on Gaussian hybrid model, using CFD to solve the data set and deep learning model, the accuracy of flow field prediction under a small amount of labeled data is solved, and the flow field prediction effect with high precision and good generalization ability is achieved .
Patent Information
- Application Number
- CN202411622813.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-14
Smart Images

Figure CN119150747B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flow field prediction, and in particular to a semi-supervised learning flow field prediction method based on a Gaussian mixture model. Background Art
[0002] The success of deep learning is largely due to the collection and use of large-scale labeled data sets. However, in many engineering application fields, especially computational fluid dynamics (CFD), obtaining high-quality data for deep learning usually requires time-consuming and labor-intensive high-precision numerical simulations. Taking flow field prediction as an example, it is necessary to solve complex control equations and perform a large number of iterative calculations. Traditional CFD methods require the construction of fine computational grids one by one, setting reasonable boundary conditions and solving control equations. The whole process is not only computationally intensive, but also prone to numerical errors.
[0003] Deep learning can automatically learn nonlinear mappings through neural networks, thereby realizing flow field structure prediction and saving a lot of time. However, existing deep learning methods usually require a large number of high-quality labeled data sets as training samples, and the cost of obtaining these data is very high.
[0004] Therefore, how to achieve accurate prediction with only a small amount of labeled flow field data and a large amount of unlabeled airfoil parameterized shape data is a technical problem that needs to be solved urgently in this field. Summary of the invention
[0005] In order to solve the above technical problems, this application proposes the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a semi-supervised learning flow field prediction method based on a Gaussian mixture model, comprising:
[0007] Obtain flow field solution data set through CFD solution method;
[0008] Dividing the data set into a labeled flow field data set, an unlabeled flow field data set and a verification set;
[0009] According to the labeled flow field data set, a flow field prediction model based on deep learning is constructed;
[0010] Training the flow field prediction model to obtain pseudo-labeled flow field data;
[0011] Using the flow field prediction model and the pre-built Transformer decoder-based model to train the mixed data set consisting of the pseudo-labeled flow field data and the real labeled flow field data respectively;
[0012] Obtain simple samples from pseudo-labeled flow field data through a bipartite Gaussian mixture model based on a designed loss function;
[0013] Adding the simple samples in equal proportion to the flow field prediction model until the training is completed;
[0014] The validation set is used to verify the effect of flow field prediction and obtain the modeled flow field.
[0015] In a possible implementation, the step of obtaining a flow field solution data set by using a CFD solution method includes:
[0016] The geometric shape of the airfoil is parametrically represented using the NURBS control point method;
[0017] The parameter space is sampled by Latin hypercube sampling method to generate different airfoil parameter combinations;
[0018] For each set of parameters, a corresponding airfoil external flow field structured grid and a corresponding Navier-Stokes-based control equation model are constructed;
[0019] Import the grid information into the solver to obtain the corresponding real flow field solution data.
[0020] In a possible implementation, the labeled flow field dataset and the unlabeled flow field dataset are respectively expressed as:
[0021] ;
[0022] in, x i It is represented as the first i The characteristic coordinates of the airfoil control points of samples, y i is the first i The flow field value of samples, l To mark the size of the flow field dataset, x j represents the characteristic coordinates of the airfoil control point of the jth sample of the unlabeled flow field dataset B, and u is the size of the unlabeled flow field dataset.
[0023] In a possible implementation, the flow field prediction model is expressed as:
[0024] FNet ;
[0025] in, y f represents the flow field value obtained by model training, x f represents the coordinates of the airfoil control points, Represents the parameters of the trained model.
[0026] In a possible implementation, training the flow field prediction model to obtain pseudo-labeled flow field data includes:
[0027] The flow field prediction model trained on the labeled flow field data set is used to calculate the flow field value of each sample in the unlabeled flow field data set;
[0028] The flow field value of each sample in the unlabeled flow field data set is used as pseudo-labeled flow field data of the unlabeled flow field data set.
[0029] In one possible implementation, a simple sample in the pseudo-labeled flow field data is obtained by using a bisection Gaussian mixture model based on a designed loss function, including:
[0030] Construct loss functions based on data constraints and physical auxiliary constraints;
[0031] Perform loss normalization processing on the loss function;
[0032] A binary Gaussian mixture model is used to calculate the loss of samples in all unlabeled flow field data sets to classify the data sets and obtain simple samples in the pseudo-labeled flow field data.
[0033] In a possible implementation, the loss function is calculated as follows:
[0034] ;
[0035] in, δ represents the weight coefficient, N represents the total number of samples, and y i Respectively represent i The flow field prediction value and the actual CFD solution value of samples, A ref represents the reference area, represents the angle of attack, Δ Cp pred_i , Δ Cp target_i Respectively represent i The predicted and true surface pressure difference values for samples.
[0036] In a possible implementation, the obtaining of a simple sample in the pseudo-labeled flow field data includes:
[0037] The flow field prediction model and the pre-built model based on the Transformer decoder are respectively used to obtain a first simple sample and a second simple sample using a bisection Gaussian mixture model;
[0038] The first simple sample and the second simple sample are intersected to obtain a final screened simple sample.
[0039] In a possible implementation, the simple samples are added to the flow field prediction model in equal proportion until the training is completed, including:
[0040] Use the labeled flow field dataset to warm up the flow field prediction model;
[0041] Introduce simple samples gradually and proportionally;
[0042] Set the amount of addition per round to 10% of the total number of simple samples, and set it to be added once every 4 training rounds until all simple samples are added to the training.
[0043] In a possible implementation, the calculation formula for adding the simple samples in equal proportion to the flow field prediction model is:
[0044] ;
[0045] ;
[0046] ;
[0047] in, represents the number of simple samples, D Indicates the data set involved in training, epo indicates the current number of training rounds, warm epo represents the total number of warm-up rounds, represents the number of simple samples screened out, B easytr Indicates the number added to model training.
[0048] Compared with the prior art, the beneficial effects of this application are:
[0049] This application uses limited labeled CFD solver to obtain data for flow field prediction problems. A loss function design that combines data loss and auxiliary physical supervision signals is adopted to ensure that the prediction results not only follow the physical properties but also meet the data constraints. The loss function introduces a GMM-based sample screening mechanism to avoid the adverse effects of noise data on model training. The verification results on the flow field prediction dataset show that compared with model training using only a small amount of labeled data, this method significantly improves the model's prediction accuracy and generalization ability to new data. By effectively utilizing unlabeled data, this method greatly enhances the model's prediction ability in dealing with unknown flow field conditions while maintaining prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of a flow chart of a semi-supervised learning flow field prediction method based on a Gaussian mixture model provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of the algorithm process provided in the embodiment of the present application;
[0052] Figure 3 The predicted flow field and error cloud diagram based on a small amount of data provided in the embodiment of the present application;
[0053] Figure 4 The predicted flow field and error cloud map based on the provided algorithm provided in the embodiment of the present application;
[0054] Figure 5 The embodiments of the present application provide a flow field and error cloud diagram based on a large amount of data. DETAILED DESCRIPTION
[0055] The present solution is described below in conjunction with the accompanying drawings and specific implementation methods.
[0056] Figure 1 A flow chart of a semi-supervised learning flow field prediction method based on a Gaussian mixture model provided in an embodiment of the present application is shown in FIG. Figure 1 The semi-supervised learning flow field prediction method based on the Gaussian mixture model in this embodiment includes:
[0057] S101, obtaining a flow field solution data set by using a CFD solution method.
[0058] In this embodiment, the geometric shape of the airfoil is parameterized using the NURBS control point method, and the parameter space is sampled by the Latin hypercube sampling method to generate different airfoil parameter combinations. For each set of parameters, a corresponding airfoil external flow field structured grid and a corresponding Navier-Stokes-based control equation model are constructed, and the grid information is imported into the solver to obtain the corresponding real flow field solution data.
[0059] S102, dividing the data set into a labeled flow field data set, an unlabeled flow field data set and a verification set.
[0060] In this embodiment, the number of labeled flow field data is 30% of the total number of samples, the number of unlabeled flow field data is 60% of the total number of samples, and the remaining 10% is used as a validation set to complete the verification of the model performance. Among them, the labeled flow field data includes the input airfoil control point coordinates and the input corresponding flow field solution values. The unlabeled flow field data only includes the airfoil control point coordinates, and its flow field solution value is unknown. For the convenience of description, it is recorded as a labeled flow field data set A , unlabeled flow field dataset B, In this embodiment, the data set A and datasetB , can be described by the following formula:
[0061] ;
[0062] in, x i It is represented as the first i The characteristic coordinates of the airfoil control points of samples, y i is the first i The flow field value of samples, l To mark the size of the flow field dataset, x j represents the characteristic coordinates of the airfoil control point of the jth sample of the unlabeled flow field dataset B, and u is the size of the unlabeled flow field dataset.
[0063] S103: constructing a deep learning-based flow field prediction model according to the labeled flow field dataset.
[0064] In this embodiment, the labeled flow field dataset is used A Construct a flow field prediction model based on Swin-FlowNet. The prediction model can be specifically expressed as:
[0065] FNet ;
[0066] in, y f represents the flow field value obtained by model training, x f represents the coordinates of the airfoil control points, Represents the parameters of the trained model. Furthermore, the labeled flow field dataset A is used for training, and the loss function adopts the L1 norm smoothing method.
[0067] S104, training the flow field prediction model to obtain pseudo-labeled flow field data.
[0068] In this embodiment, the flow field prediction model trained on the labeled flow field dataset is used to calculate the flow field value of each sample in the unlabeled flow field dataset and use it as the pseudo labeled flow field data of the unlabeled flow field dataset. B Can be redefined as:
[0069]
[0070] in, For unlabeled dataset B No. j Sample input features, yj Calculate the first j Unlabeled dataset of samples B Predicted value, u is the size of the unlabeled dataset.
[0071] S105, using the flow field prediction model and the pre-built model based on the Transformer decoder to respectively train the mixed data set consisting of the pseudo-labeled flow field data and the real labeled flow field data.
[0072] S106, obtaining simple samples from the pseudo-labeled flow field data through a bisection Gaussian mixture model based on a designed loss function. In order to ensure that the model prediction results not only rely on the data, but also meet certain aerodynamic characteristics. In this embodiment, the specific loss function design includes the loss of data samples and auxiliary physical monitoring signal loss Two parts. Therefore, the loss function can be expressed as:
[0073]
[0074] in, represents the weight coefficient, which is set to 0.4 in this embodiment. Further,
[0075]
[0076] in, δ represents the weight coefficient, N represents the total number of samples, and yi Respectively represent i The flow field prediction value and the actual CFD solution value of samples, A ref represents the reference area, represents the angle of attack, Δ Cp pred_i , Δ Cp target_i Respectively represent i The predicted and true surface pressure difference values for samples.
[0077] Before using GMM to divide the simple sample set and the difficult sample set, all loss values are normalized to the range of [0, 1]. In this embodiment, the formula for loss normalization is as follows:
[0078]
[0079] in, It refers to j The predicted data obtained by the model, and They are unlabeled samples. B set Loss The minimum and maximum values in .
[0080] The binary Gaussian mixture model is used to calculate the loss of all samples in the unlabeled flow field data set to classify the data set, and obtain simple samples in the pseudo-labeled flow field data. The calculation formula is:
[0081]
[0082] Among them, GMM represents Gaussian mixture model, Indicates unlabeled samples B Middle j The label of whether a sample is a simple sample or a difficult sample can be further expressed as:
[0083]
[0084] in, represents a simple sample set obtained after partitioning, Represents the difficult sample set obtained after division.
[0085] See also Figure 2 In this embodiment, the model trained with the labeled flow field dataset is used A The flow field model built based on the Transformer decoder uses binary GMM to obtain its simple samples and obtain and Two different subsets, in order to obtain the common part of the simple samples obtained by the two models through GMM, take and Take the intersection method to get the final screening simple sample , which can be specifically expressed as:
[0086] .
[0087] S107, adding the simple samples to the flow field prediction model in equal proportion until the training is completed.
[0088] In this embodiment, at the beginning of training, the flow field prediction model is preheated using the labeled flow field data to ensure that the model has a stable starting state. The preheating stage accounts for 10% to 20% of the total training rounds. Then, simple samples are gradually and proportionally introduced, with the amount added in each round being 10% of the total number of simple samples, and set to be added once every 4 training rounds until all simple samples are added to the training, and all samples are trained together to the maximum round. The final flow field prediction model is obtained. This process can be specifically expressed as:
[0089] ;
[0090] ;
[0091] ;
[0092] in, represents the number of simple samples, D Indicates the data set involved in training, epo indicates the current number of training rounds, warm epo represents the total number of warm-up rounds, represents the number of simple samples screened out, B easytr Indicates the number added to model training.
[0093] S108, using the verification set to verify the effect of the flow field prediction to obtain a modeled flow field.
[0094] In this embodiment, the training model is obtained H The flow field prediction verification is completed on the verification set. Figure 3-5 As shown in the figure, the prediction results of the proposed method, the method based on a small amount of labeled samples training and the method based on a large amount of labeled samples training are shown. It can be seen from the flow field error cloud diagram that compared with the training based on a small amount of data, the proposed method has significantly improved the prediction effect, and its flow field prediction effect is basically consistent with the fitting trend of the supervised learning method based on a large amount of labeled data, indicating that the proposed method reduces the need for a large amount of labeled data, and the performance of the supervised learning training results based on a large amount of data on the validation set is consistent, proving the effectiveness and feasibility of the method.
[0095] In the embodiments of the present application, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0096] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0097] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A semi-supervised learning flow field prediction method based on Gaussian mixture model, characterized in that: include: Obtain flow field solution data set through CFD solution method; The method of obtaining a flow field solution data set by using a CFD solution method includes: The geometric shape of the airfoil is parametrically represented using the NURBS control point method; The parameter space is sampled by Latin hypercube sampling method to generate different airfoil parameter combinations; For each set of parameters, a corresponding airfoil external flow field structured grid and a corresponding Navier-Stokes-based control equation model are constructed; Import the grid information into the solver to obtain the corresponding real flow field solution data; Dividing the data set into a labeled flow field data set, an unlabeled flow field data set and a verification set; The labeled flow field dataset and the unlabeled flow field dataset are respectively expressed as: Among them, x i It is represented as the characteristic coordinates of the airfoil control point of the i-th sample of the labeled flow field dataset A, y i is the flow field value of the i-th sample of the labeled flow field dataset A, l is the size of the labeled flow field dataset, x j represents the characteristic coordinates of the airfoil control point of the jth sample of the unlabeled flow field dataset B, and u is the size of the unlabeled flow field dataset; According to the labeled flow field data set, a flow field prediction model based on deep learning is constructed; The flow field prediction model is expressed as: and f =FNet(x f ,θ f ); Among them, y f represents the flow field value obtained by model training, x f represents the coordinates of the airfoil control points, θ f Represents the parameters of the trained model; Training the flow field prediction model to obtain pseudo-labeled flow field data; Using the flow field prediction model and the pre-built Transformer decoder-based model to train the mixed data set consisting of the pseudo-labeled flow field data and the real labeled flow field data respectively; Obtain simple samples from pseudo-labeled flow field data through a bipartite Gaussian mixture model based on a designed loss function; The calculation formula of the loss function is: Among them, δ represents the weight coefficient, N represents the total number of samples, and i Respectively represent i The flow field prediction value and the actual CFD solution value of samples, A ref represents the reference area, α represents the angle of attack, ΔCp pred_i , ΔCp target_i Respectively represent i The predicted and actual surface pressure difference values for samples; Adding the simple samples in equal proportion to the flow field prediction model until the training is completed; The validation set is used to verify the effect of flow field prediction and obtain the modeled flow field.
2. The semi-supervised learning flow field prediction method based on Gaussian mixture model according to claim 1, characterized in that: Training the flow field prediction model to obtain pseudo-labeled flow field data includes: The flow field prediction model trained on the labeled flow field data set is used to calculate the flow field value of each sample in the unlabeled flow field data set; The flow field value of each sample in the unlabeled flow field data set is used as pseudo-labeled flow field data of the unlabeled flow field data set.
3. The semi-supervised learning flow field prediction method based on Gaussian mixture model according to claim 1, characterized in that: A simple sample of pseudo-labeled flow field data is obtained by using a bipartite Gaussian mixture model based on a designed loss function, including: Construct loss functions based on data constraints and physical auxiliary constraints; Perform loss normalization processing on the loss function; A binary Gaussian mixture model is used to calculate the loss of samples in all unlabeled flow field data sets to classify the data sets and obtain simple samples in the pseudo-labeled flow field data.
4. The semi-supervised learning flow field prediction method based on Gaussian mixture model according to claim 3 is characterized in that: The step of obtaining a simple sample from the pseudo-labeled flow field data comprises: The flow field prediction model and the pre-built model based on the Transformer decoder are respectively used to obtain a first simple sample and a second simple sample using a bisection Gaussian mixture model; The first simple sample and the second simple sample are intersected to obtain a final screened simple sample.
5. The semi-supervised learning flow field prediction method based on Gaussian mixture model according to claim 1, characterized in that: Adding the simple samples in equal proportion to the flow field prediction model until the training is completed, including: Use the labeled flow field dataset to warm up the flow field prediction model; Introduce simple samples gradually and proportionally; Set the amount of addition per round to 10% of the total number of simple samples, and set it to be added every 4 training rounds until all simple samples are added to the training.
6. The semi-supervised learning flow field prediction method based on Gaussian mixture model according to claim 5 is characterized in that: The calculation formula for adding the simple samples in equal proportion to the flow field prediction model is: D=A∪B easy ; in, represents the number of simple samples, D represents the data set involved in training, epo represents the current number of training rounds, warm epo Indicates the total number of warm-up rounds, num(B easy ) represents the number of simple samples screened, B easytr Indicates the number added to model training.
Citation Information
Patent Citations
Airfoil flow field prediction method based on Transform decoder network
CN115758891A