Search

CN-122021472-A - Knowledge distillation-based flux reconstruction method, device, equipment, medium and product

CN122021472ACN 122021472 ACN122021472 ACN 122021472ACN-122021472-A

Abstract

The invention discloses a flux reconstruction method, device, equipment, medium and product based on knowledge distillation, and belongs to the technical field of computational fluid mechanics and artificial intelligence. The method comprises the steps of generating a data set according to given flow field conditions by adopting a numerical flux format, constructing a neural network for knowledge distillation and generating a loss function with physical constraint, performing continuous learning incremental training on the neural network by utilizing the data set and the loss function based on an anti-forgetting knowledge distillation mechanism, enabling the neural network to continuously adapt to new flow states along with the spatial change of flow field parameters, keeping the prediction capability of old tasks, deploying the trained neural network in a CFD solver, and predicting data flux in real time according to the physical states at two sides of a grid unit interface at each time step to complete flow field evolution. The invention can realize high precision and high efficiency of flux prediction.

Inventors

  • LIU FENG
  • LI YUBO
  • ZHENG YINGLONG
  • TANG HONGWEI
  • CHEN JUNRUI
  • JIANG WANQIU
  • LONG YIN

Assignees

  • 中国空气动力研究与发展中心超高速空气动力研究所

Dates

Publication Date
20260512
Application Date
20260414

Claims (10)

  1. 1. A method of flux reconstruction based on knowledge distillation, the method comprising: The method comprises the steps of generating a data set by adopting a numerical flux format according to a given flow field condition, wherein the data set covers a preset target working domain and comprises a plurality of tasks in a flowing state, and the data set of each task is paired with a corresponding real numerical flux by an input variable set to form a sample pair; constructing a neural network for knowledge distillation and generating a loss function with physical constraints; based on an anti-forgetting knowledge distillation mechanism, the data set and the loss function are utilized to perform continuous learning incremental training on the neural network, so that the neural network is continuously adapted to a new flow state along with the spatial change of flow field parameters, and the prediction capability of an old task is maintained; And deploying the trained neural network in a CFD solver, and predicting data flux in real time according to physical states at two sides of the grid cell interface at each time step to complete flow field evolution.
  2. 2. The method of claim 1, wherein the loss function with physical constraints includes at least a loss term for an interface flux antisymmetry constraint and a loss term for an entropy increasing condition constraint.
  3. 3. The method of claim 2, wherein the loss term for the interface flux antisymmetry constraint is: Wherein, the N is the number of samples in the current training batch; , In the ith sample, the original input variable sets on the left side and the right side of the interface; The numerical flux predicted for the neural network.
  4. 4. The method of claim 2, wherein the loss term for the entropy increasing condition constraint is: Wherein, the N is the number of samples in the current training batch; The entropy rate at the interface is the i-th sample.
  5. 5. The method of claim 1, wherein the data set for each task is used for incremental training of the batch, respectively; The incremental training for continuous learning of the neural network comprises the following steps: Performing first training on the neural network by using the first task data set to obtain a student model and a teacher model which are obtained by the first training as second incremental training; Determining whether incremental training is completed, entering the incremental training of the round if the incremental training is not completed, performing the incremental training on the student model by using a task data set of the round in the incremental training process of the round, distilling knowledge from a teacher model of the round to a student model of the round to obtain a student model of the round after the training, taking the student model of the round after the training as a teacher model and a student model of the next round of the incremental training, taking the teacher model of the round not to participate in the training in the incremental training process of the student model of the round, and taking the student model of the current training as a trained neural network if the incremental training is completed.
  6. 6. The method of claim 5, further comprising, after each round of training, selecting a first proportion of the sample pairs in the dataset used in the present round of training to store in the buffer, and mixing the next round of task dataset with the buffer's sample pairs according to a second proportion prior to the next round of training, and taking the mixed dataset as the next round of task dataset.
  7. 7. A knowledge distillation based flux reconstruction apparatus, the apparatus comprising: The system comprises a generation unit, a data set, a parameter space generation unit, a data set generation unit and a data processing unit, wherein the generation unit is used for generating a data set by adopting a numerical flux format according to a given flow field condition, the data set covers a preset target working domain and comprises a plurality of tasks in a flowing state, and the data set of each task is paired with a corresponding real numerical flux by an input variable set to form a sample pair; A building unit for building a neural network for knowledge distillation and generating a loss function with physical constraints; The training unit is used for carrying out continuous learning incremental training on the neural network by utilizing the data set and the loss function based on an anti-forgetting knowledge distillation mechanism, so that the neural network is continuously adapted to a new flow state along with the spatial change of flow field parameters, and the prediction capability of an old task is maintained; The prediction unit is used for deploying the trained neural network in the CFD solver, predicting the data flux in real time according to the physical states at the two sides of the grid unit interface at each time step, and finishing the flow field evolution.
  8. 8. A computer device, characterized in that it comprises a memory for storing a computer program and a processor for executing the computer program stored on the memory for carrying out the steps of the method according to any of the preceding claims 1-6.
  9. 9. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-6.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-6.

Description

Knowledge distillation-based flux reconstruction method, device, equipment, medium and product Technical Field The invention relates to the technical field of computational fluid mechanics and artificial intelligence, in particular to a flux reconstruction method, device, equipment, medium and product based on knowledge distillation. Background With the rapid development of high performance computing, numerical simulation has become a core support for scientific research and engineering design. Computational fluid dynamics (Computational Fluid Dynamics, CFD) is a typical physical scenario involving strong non-linear, intermittent and multi-scale interactions, and the need for high precision numerical methods and high computational power is particularly urgent. The high-precision calculation format based on the finite volume method is a mainstream technology for solving Euler equations and Navier-Stokes equations. The finite volume method (Finite Volume Method) and its classical numerical flux format have long been the mainline tool for stable calculation of conservation equations in engineering and scientific communities. To address the different flow problems and the different requirements of flux calculation accuracy, researchers have created various numerical flux formats including the center differencing method, the windward format, the Rusanov format, the AUSM format, and the like. The main steps of the finite volume method include physical quantity reconstruction, gradient reconstruction and numerical flux calculation within a single time step. Firstly, reconstructing the physical quantity to obtain the distribution of the physical quantity on the grid cell surface, secondly, calculating the change trend of the physical quantity in the calculation unit by gradient calculation, and finally, calculating the numerical flux according to the results of reconstruction and gradient calculation. As an important part of the finite volume method, the numerical flux represents the physical quantity exchange of the control body surface. Their accuracy and efficiency directly determine the numerical stability and convergence speed of the overall simulation. Considering that each face of each grid cell needs to perform flux calculation, the calculation amount of flux calculation increases exponentially with the increase of the grid amount. Particularly in CFD simulation with high fidelity, extremely fine grids and small time steps are often required, resulting in high computational costs and difficulty in meeting the urgent demands for rapid analysis and design in engineering practice. The calculated time of the flux calculation occupies 50% of the calculated time by the limited volume method. Solving this problem is also a key focus of current CFD research. Therefore, it is necessary to provide a flux reconstruction method with high accuracy and high efficiency. Disclosure of Invention The invention provides a flux reconstruction method, device, equipment, medium and product based on knowledge distillation, which can solve the problems of low flux reconstruction precision and low efficiency in the related technology. The technical proposal is as follows: In one aspect, a method of flux reconstruction based on knowledge distillation is provided, the method comprising: The method comprises the steps of generating a data set by adopting a numerical flux format according to a given flow field condition, wherein the data set covers a preset target working domain and comprises a plurality of tasks in a flowing state, and the data set of each task is paired with a corresponding real numerical flux by an input variable set to form a sample pair; constructing a neural network for knowledge distillation and generating a loss function with physical constraints; based on an anti-forgetting knowledge distillation mechanism, the data set and the loss function are utilized to perform continuous learning incremental training on the neural network, so that the neural network is continuously adapted to a new flow state along with the spatial change of flow field parameters, and the prediction capability of an old task is maintained; And deploying the trained neural network in a CFD solver, and predicting data flux in real time according to physical states at two sides of the grid cell interface at each time step to complete flow field evolution. In another aspect, there is provided a knowledge-based distillation flux reconstruction apparatus, the apparatus comprising: The system comprises a generation unit, a data set, a parameter space generation unit, a data set generation unit and a data processing unit, wherein the generation unit is used for generating a data set by adopting a numerical flux format according to a given flow field condition, the data set covers a preset target working domain and comprises a plurality of tasks in a flowing state, and the data set of each task is paired with a corresponding real numerical flux by