A method and device for accelerating flow field prediction

The hybrid neural network is constructed through deep learning technology, and the problem of time-consuming non-stable flow field calculation in the high-order intermittent Galerkin method is solved, and efficient flow field prediction is achieved, which is suitable for industrial application scenarios.

CN114218875BActive Publication Date: 2024-12-17NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111517186.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-08
Publication Date
2024-12-17
Estimated Expiration
2041-12-08

AI Technical Summary

Technical Problem

The high-precision solution calculation process of non-constant flow fields in the advanced intermittent Galerkin method takes a long time, and the computing resources consume hugely, making it difficult to achieve effective acceleration.

Method used

Using deep learning technology, a hybrid neural network is built based on the advanced intermittent Galerkin method. The neural network is trained by training the sample set, and predicted the predicted sample sets and predicted it. The GPU computing power platform is used to quickly predict non-constant flow field information to improve Computational efficiency.

Benefits of technology

It significantly improves the time efficiency of non-static flow field prediction, meets the accuracy requirements of engineering application, reduces computing resource consumption, and provides a new non-static flow field prediction modeling idea, which is suitable for industrial application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218875B_ABST
    Figure CN114218875B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an acceleration method and device for flow field prediction, which relates to the field of flow field prediction in fluid mechanics research, and can intelligently accelerate the flow field prediction process in high-order DG numerical format. The present invention includes: a CFD server receives initial flow field condition data sent by a client; establishes a calculation framework for the flow field, and uses the calculation framework to obtain training data; arranges the training data according to the spatial adjacent relationship of each unit in the calculation grid, and then constructs a training sample set according to the order of the data generated by the calculation framework; trains the neural network through the training sample set until the prediction accuracy reaches the engineering application requirements; generates a prediction sample set according to the current flow field condition data, and inputs the trained neural network to obtain the prediction result output by the trained neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of flow field prediction in fluid mechanics research, and in particular to an acceleration method and device for flow field prediction. Background Art

[0002] In the past three decades, with the development and progress of computing power and mathematical algorithms, CFD (Computational Fluid Dynamics) technology has made great progress, and design and optimization based on numerical simulation technology have become increasingly popular. However, the high-precision solution calculation process of unsteady flow fields is extremely time-consuming and is a problem that needs to be solved urgently.

[0003] The high-order discontinuous Galerkin method (DG) can obtain high-order accuracy in cells of arbitrary geometric shapes and is considered to be one of the most promising technologies for solving this problem. However, this method increases the order of the interpolation function inside the cell and also increases the actual computational complexity and storage capacity of a single cell. Although in general, the high-order discontinuous Galerkin method requires much fewer unknown degrees of freedom than the finite volume method to obtain numerical results of the same accuracy, the long-term unsteady computational complexity is still very large.

[0004] Therefore, how to intelligently accelerate the flow field prediction process in high-order DG numerical format has become a problem that needs to be studied. Summary of the invention

[0005] The embodiments of the present invention provide an acceleration method and device for flow field prediction, which can intelligently accelerate the flow field prediction process in a high-order DG numerical format.

[0006] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:

[0007] In a first aspect, an embodiment of the present invention provides a method comprising:

[0008] S1. The CFD server receives initial flow field condition data sent by the client, wherein the flow field condition data at least includes: an incoming flow angle of attack, an incoming flow Mach number, and a Reynolds number of the flow field at an initial moment;

[0009] S2. Establishing a computational framework for the flow field, and using the computational framework to obtain training data, the training data including: flow field information divided by time and high-order expression coefficients corresponding to the flow field information;

[0010] S3, arranging the training data according to the spatial adjacent relationship of each unit in the calculation grid, and then constructing a training sample set according to the order in which the data is generated by the calculation framework;

[0011] S4, training the neural network using the training sample set until the prediction accuracy reaches the engineering application requirements;

[0012] S5. Generate a prediction sample set according to the current flow field condition data, and input it into the trained neural network to obtain the prediction result output by the trained neural network.

[0013] In a second aspect, an embodiment of the present invention provides a device, comprising:

[0014] A receiving module, used for receiving initial flow field condition data sent by a client, wherein the flow field condition data at least includes: an incoming flow angle of attack, an incoming flow Mach number and a Reynolds number of the flow field at an initial moment;

[0015] A calculation preparation module, used to establish a calculation framework for the flow field, and use the calculation framework to obtain training data, the training data including: flow field information divided by time and high-order expression coefficients corresponding to the flow field information;

[0016] A preprocessing module, used to arrange the training data according to the spatial adjacent relationship of each unit in the calculation grid, and then construct a training sample set according to the order of the data generated by the calculation framework;

[0017] A training module, used to train the neural network through the training sample set until the prediction accuracy reaches the engineering application requirements;

[0018] The prediction module is used to generate a prediction sample set according to the current flow field condition data, and input the set into the trained neural network to obtain the prediction result output by the trained neural network.

[0019] The acceleration method and device for flow field prediction provided by the embodiment of the present invention can enable users to input flow field condition information on the client. After the initialization operation, the CFD server constructs a calculation framework (compressible or incompressible), uses a high-order DG algorithm to perform numerical simulation, and constructs an overall training sample set for training based on the calculation grid and its adjacent relationship. Train a hybrid neural network on the GPU computing power platform to obtain a flow field prediction model, and verify the prediction accuracy. If the accuracy does not meet the engineering application requirements, adjust the model or retrain, and return the finalized network to the CFD server. The network can be called to achieve the purpose of improving computing efficiency. The intelligent acceleration results that meet the engineering application accuracy requirements are returned to the client visualization interface. The present invention is suitable for industrial application scenarios such as rapid and accurate acquisition of unsteady flow fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A schematic diagram of the overall logical framework provided for an embodiment of the present invention;

[0022] Figure 2 It is an overall flow chart of unsteady flow field prediction modeling for high-order DG numerical format in a specific embodiment;

[0023] Figure 3 It is a schematic diagram of a calculation grid in a specific embodiment;

[0024] Figure 4 A schematic diagram of grid adjacency relationship in a specific embodiment;

[0025] Figure 5 It is an overall structural diagram of a deep neural network in a specific embodiment;

[0026] Figure 6 is a three-dimensional convolution module structure in a specific embodiment;

[0027] Figure 7 is the residual network module structure in a specific embodiment;

[0028] Figure 8 is the attention mechanism module structure in a specific embodiment;

[0029] Fig. 9 To calculate the positions of two specified observation points in the grid in a specific embodiment;

[0030] Fig.10 is the relative error curve of variable u at points P1 and P2 in a specific embodiment;

[0031] Fig.11 is the relative error curve of the variable v at points P1 and P2 in a specific embodiment;

[0032] Fig.12 is the relative error curve of variable p at points P1 and P2 in a specific embodiment, from Figures 10-12 It can be seen that the indicator of the vertical axis MAPE is controlled below 0.2%;

[0033] Fig.13 A schematic diagram of a method flow provided by an embodiment of the present invention;

[0034] Fig.14 A schematic diagram of a device structure provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention will be described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention. It can be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "one", "said" and "the" used herein may also include plural forms. It should be further understood that the term "including" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used here may include wireless connection or coupling. The term "and / or" used herein includes any unit and all combinations of one or more associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as generally understood by those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.

[0036] Traditional computational fluid dynamics methods include finite element method, finite difference method, and finite volume method. However, for some complex flow problems, such as turbulence, shock wave, aerodynamic noise problems, etc., it is necessary to accurately capture eddy structures of different scales, shock wave structures, and small disturbance sound waves. Low-order precision will cover up the real physical viscosity of the fluid due to excessive dissipation, and it is impossible to perform fine numerical simulation. The high-order DG algorithm used in this embodiment belongs to a high-precision algorithm, which makes up for the above-mentioned shortcomings. However, the existing numerical simulation methods consume huge computing resources. In order to solve this problem, some researchers use reduced-order models to improve computing efficiency, such as dynamic mode decomposition (Dynamic Mode Decomposition, DMD) method, Koopman operator (Koopman Operator) method and Proper Orthogonal Decomposition (Proper Orthogonal Decomposition, POD) method. However, boundary conditions, Reynolds number and other real flow field states have a great influence on the model accuracy of this type of method. The reduced-order model lacks robustness and is not suitable for application to flow fields under all conditions. As an efficient function approximation technology, deep learning technology has also been applied to the field of flow field prediction in recent years. However, some work still has limitations. That is, the training samples are composed of physical quantities at a finite number of sampling points on the computational grid. If the physical quantities at all positions in the flow field are to be obtained, the interpolation method is generally adopted, which will cause potential errors.

[0037] In general, the existing numerical simulation methods consume huge computing resources, take a long time to calculate, and occupy a lot of computing resources. Therefore, the design purpose of this embodiment is to intelligently accelerate the flow field prediction process in the high-order DG numerical format.

[0038] The design idea of ​​this embodiment is mainly that it is different from the design idea of ​​the existing solution that treats the flow field as an image and then predicts it through deep learning. This embodiment designs a new modeling method, which arranges the high-order polynomial coefficients generated in the CFD solution (i.e., the original variables of the high-order discontinuous Galerkin method) according to the spatial adjacent relationship of the grid units, and composes sequence data according to the time series relationship. Specifically, a feasible new deep neural network is constructed based on the original data structure of the high-order discontinuous Galerkin method, and a holographic unsteady flow field is obtained by directly predicting the unsteady high-order polynomial coefficients (i.e., the original unknowns). The present invention uses relevant technologies in the field of computer vision to capture the spatiotemporal dynamic characteristics in fluid mechanics, and based on the main idea of ​​data-driven, proposes a hybrid deep neural network to quickly predict flow field information to achieve the purpose of intelligent acceleration.

[0039] The present invention belongs to the field of flow field prediction in computational fluid dynamics, and is specifically applied to the intelligent acceleration of unsteady flow field calculations of a high-order discontinuous Galerkin method. Whether in experiments or actual production, as long as it involves unsteady flow field calculations of a high-order discontinuous Galerkin method, the present invention can be used to accelerate the process, thereby improving the operating efficiency of the entire process calculation system.

[0040] The embodiment of the present invention provides an acceleration method for flow field prediction, such as Fig.13 As shown, including:

[0041] S1. The CFD server receives the initial flow field condition data sent by the client.

[0042] The flow field condition data at least includes: the incoming flow angle of attack, incoming flow Mach number and Reynolds number of the flow field at the initial moment. Specifically, after the user logs in on the client, the CFD server and computing platform will grant the user corresponding permissions based on the user's permission level. Then, the CFD server and computing platform perform initialization operations, including but not limited to allocating resources and binding resources to the logged-in user, storing user operation records, etc. Afterwards, the user can enter the initial conditions required for calculating the flow field on the client.

[0043] S2. Establish a computational framework for the flow field, and use the computational framework to obtain training data.

[0044] The training data includes: flow field information divided by time and high-order expression coefficients corresponding to the flow field information. Specifically, a corresponding control model is constructed on the CFD server side, and an implicit large eddy simulation based on a high-order DG algorithm is used to generate high-order polynomial coefficients required for model training and testing.

[0045] S3. Arrange the training data according to the spatial adjacent relationship of each unit in the calculation grid, and then construct a training sample set according to the sequential relationship of the data generated by the calculation framework.

[0046] Among them, Figure 3 The figure is a schematic diagram of the computational grid designed in this embodiment, wherein the grid unit can be understood as Figure 3 Each small unit in. Specifically, Figure 3 The computational grid cells in can be equivalently converted into Figure 4 The schematic diagram of grid adjacency relationship is shown. In this embodiment, the generated training data is arranged according to the spatial adjacency relationship of the calculation grid units, and the training sample set is constructed according to the time sequence relationship.

[0047] S4. The neural network is trained using the training sample set until the prediction accuracy reaches the engineering application requirement.

[0048] The training sample set is placed on the GPU computing platform for neural network training and prediction accuracy verification. If the accuracy does not meet the requirements of engineering applications, the model is adjusted or retrained. Specifically, if the percentage error is controlled below 1% and there is no visual difference between the predicted flow field cloud map and the actual result, it can be considered that the prediction accuracy meets the requirements of engineering applications.

[0049] S5. Generate a prediction sample set according to the current flow field condition data, and input it into the trained neural network to obtain the prediction result output by the trained neural network.

[0050] Among them, a small amount of known samples are input into the neural network after training, and the flow field data of the next time period is dynamically predicted, thereby improving the calculation efficiency. It should be pointed out that the output of the neural network is the flow field data in the future time period, and finally the prediction results that meet the accuracy requirements (the result after intelligent acceleration) are returned to the client visualization interface.

[0051] This embodiment can be applied to the field of unsteady flow field prediction, significantly improving the time efficiency of obtaining holographic flow field data to achieve the purpose of intelligent acceleration, and has good generalization performance, providing a new unsteady flow field prediction modeling method for the engineering application field of computational fluid dynamics. The present invention includes: the user can input the flow field condition information on the client. After the initialization operation, the CFD server constructs the control equation (compressible or incompressible), uses the high-order DG algorithm to perform numerical simulation, and constructs the overall training sample set for training according to the calculation grid and its adjacent relationship. Train the hybrid neural network on the GPU computing power platform to obtain the flow field prediction model, and verify the prediction accuracy. If the accuracy does not meet the engineering application requirements, adjust the model or retrain, and return the final network to the CFD server. The purpose of improving the computing efficiency can be achieved by calling the network. The intelligent acceleration results that meet the engineering application accuracy requirements are returned to the client visualization interface. The present invention is suitable for the industrial application scenario of quickly and accurately obtaining unsteady flow fields.

[0052] In this embodiment, the process of acquiring training data using the computing framework includes: using implicit large eddy simulation to perform numerical simulation on the control equation (NS equation) in the computing framework.

[0053] Among them, Figure 2As shown in the figure, the first step is the control equation, and the four steps before the sample set construction are the steps for solving the control equation. Specifically, the numerical simulation method adopts implicit large eddy simulation (ILES). When solving the control equation, the traditional large eddy simulation method first needs to divide the flow into large-scale vortices and small-scale vortices through a filtering function. After filtering, the sub-grid stress tensor is obtained, which is an additional term introduced in the filtering process, similar to the additional eddy viscosity term introduced in the turbulence model of the RANS method. Unlike the explicit method, the implicit large eddy simulation uses the dissipation of the numerical format in the calculation process directly as the sub-grid model, and there is no need to establish an additional model to make the equation closed. The uncertainty caused by the interaction between the filtering truncation error and the numerical error in the large eddy simulation method is avoided.

[0054] Then, the calculation framework is spatially discretized by using the discontinuous Galerkin method (DG algorithm), and then the calculation framework is unsteadily advanced in time by implicit time discretization, wherein the Newton method is used for iterative calculation within a single time step. Finally, the high-order expression coefficient is obtained.

[0055] Among them, the NS equations (i.e., the control model) are first spatially discretized using the discontinuous Galerkin method, and then the unsteady time advancement is completed using an implicit time discretization method, wherein the Newton method is used for iterative calculation within a single time step, and the resulting large linear system is calculated using the preprocessed GMERS method to obtain the data required for training, i.e., the high-order expression coefficients.

[0056] Specifically, the control equation includes: Among them, U represents the conserved variable, t represents the time variable, and F c (U) represents the inviscid flux, u and v represent the orthogonal components of the velocity, represents the viscous flux.

[0057] In two dimensions, the conserved variable U is: Among them, ρ represents the pressure at a point in the flow field, u and v represent the orthogonal components of the velocity, and E represents the unit total energy.

[0058] The method of using the discontinuous Galerkin method to spatially discretize the computing framework includes: using the discontinuous Galerkin method to spatially discretize the computing framework, and the obtained discretization form is:

[0059]

[0060] Among them, 0≤j≤n, φ j is the basis function, is the auxiliary variable introduced, Auxiliary numerical flux introduced in the boundary integral part, Ω eRepresents a unit, Representation unit Ω e The boundary of the unit, n represents the external normal vector of the unit boundary, U h represents a conserved variable, is the viscosity numerical flux j represents the subscript of the basis function, Θ - and Θ + Represent the variable values ​​of the left and right units of the interface, F is the integral of the diffusion term inside the unit, Θ h is an auxiliary variable, σ represents the boundary of the calculation area, is the variable value, represents the integral of the diffusion term at the element boundary.

[0061] The discrete system of the calculation framework obtained from the discrete form is: Where M is the global mass matrix, u=[u1,u2,…,u k ,...,u Nele ] T is the global degrees of freedom vector, u k represents the degree of freedom of unit k, u k =[u 1,1 ,u 1,2 ,…,u 1,Nd ,…,u k,1 ,…,u k,Nd ,…,u Ne,1 ,…,u Ne,Nd ] T , where Nele represents the number of global units, Ne, Nd represent the number of equations in the unit and the degree of freedom of each variable, respectively, R(u) = [R1, R2, …, R k ,…,R Nele ] T is the global residual vector, R k Represents the residual value vector of unit k.

[0062] Furthermore, it also includes: dividing the computational domain by structured grids, conserving the variable U within the grid cells h (x,t) is Among them, u j (t) is the original variable in the form of high-order coefficients, φ j (x) is the basis function corresponding to the high-order expression coefficient, and N is the number of basis functions of the corresponding order. The computational domain is divided using a structured grid, and the computational grid is as follows: Figure 3 As shown in the figure, the conserved variables inside the grid cells are expressed by high-order polynomials: Among them, u j (t) is the original variable in the form of high-order coefficients, φj (x) is the corresponding basis function, and N is the number of basis functions of the corresponding order.

[0063] In this embodiment, in the process of performing unsteady time advancement on the computing framework through implicit time discretization, the process includes:

[0064] The residual value item is t n+1 The residual term of the time step is calculated, and the discrete system of the calculation framework is processed by the backward Euler difference method to obtain: Among them, t n+1 The unsteady residual value R e for: At each time step t n+1 Newton iteration is used to solve until the residual value R e (u k ) approaches 0 infinitely.

[0065] Specifically, implicit time discretization is performed and the residual term is taken as t n+1 The time step variable is calculated, and the backward Euler difference method is used on the above formula to obtain the following form: Definition n+1 The unsteady residual value R e for: At each time step t n+1 The Newton iteration method is used to solve until the residual value R e (u k )→0. The specific steps are as follows:

[0066] u 0 =u n

[0067]

[0068] u n+1 =u k+1

[0069] Where λ is the relaxation factor, is the Jacobian matrix of the kth Newton iteration step equation. The implicit time marching method in this paper can be divided into three levels. The outermost link is the time step cycle, followed by the Newton iteration cycle of the above equation, and the innermost link is the solution of the linear equation system. When the solution of the innermost linear equation system converges, it enters the next Newton cycle. The Newton cycle continues until the unsteady residual value R e (u n+1 ) tends to 0 or the number of Newton iteration steps reaches k max After that, the program enters the next time step t n+1 Calculation. Thus we get the original variable u j(t), and then substitute it into the formula to get the physical quantity in each unit in the flow field, and then the holographic flow field information can be obtained.

[0070] Furthermore, constructing the training sample set according to the time sequence relationship includes:

[0071] The flow field information at each moment is uniformly calibrated in a rectangular space of fixed size. In each time step, the conserved variable U is extracted and calculated in each grid cell.

[0072] Among them, the required interpolation polynomial coefficients are u j (t)(j=1,…,10), each grid cell contains 40 high-order expression coefficients when the third-order format is used. Specifically, the flow field information at each moment can be uniformly calibrated in a rectangular space of a fixed size (the size of the rectangular space depends on the structure of the computational grid). In a single time step, the coefficients calculated by Newton's method are taken as follows: that is, the interpolation polynomial coefficients u required to calculate the conserved variable U (composed of four components) are extracted in each cell. j (t)(j=1,...,10), each unit contains 40 high-order expression coefficients in the case of the third-order format. Therefore, three-dimensional data is used to represent the flow field information at each moment, and finally the data is arranged in chronological order to obtain the overall data set.

[0073] The training of the neural network by the training sample set includes: establishing a three-dimensional convolutional neural network module and a deep residual convolutional network module of the neural network. Embedding a soft attention mechanism module into the last part of the neural network. Randomly initializing network parameters and inputting the training set into the neural network. Optimizing weights and bias coefficients by minimizing the loss function and correcting the weight of each neuron. Wherein, the loss function is:

[0074] N g represents the total number of training data, λ represents the regularization coefficient, represents the predicted value of the deep neural network, Y i represents the CFD calculation results at the same time, w represents the weight coefficient, Represents the square of the 2-norm of the weight coefficient. For example, we can first build a three-dimensional convolutional neural network module and a deep residual convolutional network module; then embed a soft attention mechanism module called SENET (Squeeze-and-Excitation Networks) into the last part of the overall network; then, randomly initialize the network parameters and input the training data set into the network, and the loss function is as follows:

[0075]

[0076] Among them, N g represents the total number of training data, λ represents the regularization coefficient, Y i * represents the predicted value of the deep neural network, Y i represents the corresponding CFD calculation result. The second item is the L2 parameter norm penalty, also called weight decay, which limits the learning ability of the model to a certain extent and reduces the generalization error rather than the training error.

[0077] Finally, the weights and bias coefficients are optimized by minimizing the loss function, that is, the weights of each neuron are corrected according to the error back propagation.

[0078] The process of detecting whether the prediction accuracy meets the requirements of engineering applications includes: converting the results of neural network training (composed of high-order expression coefficients) into flow field cloud maps; judging whether the prediction cloud maps meet the accuracy requirements to evaluate the prediction ability of the model; if the accuracy does not meet the requirements of engineering applications, the model is adjusted or retrained; the finalized network is returned to the CFD server, and the network can be called to improve the calculation efficiency. The intelligent acceleration results that meet the accuracy requirements of engineering applications are returned to the client visualization interface.

[0079] The neural network designed in this embodiment is specifically a hybrid deep neural network, which is composed of various modules, including:

[0080] (1) 3D convolution module: 3D convolution is applied to a cube formed by stacking multiple adjacent frames, and then the 3D convolution kernel is used for calculation in this cube. Figure 6 As shown in the figure, the left column is continuous in time, and each feature map on the right is connected to two adjacent frames in the previous layer. The value at each position in the feature map is obtained by convolution with the receptive field at the same position in three consecutive frames of the previous layer, so as to capture dynamic information. In the deep neural network of this paper, the value at the point (x, y, z) on the jth feature map of the i-th layer is expressed as:

[0081]

[0082] In the above formula, W, H, and D represent the width, length, and height of the three-dimensional convolution kernel, respectively. Tanh is a nonlinear activation function. is the value at the (w, h, d) position in the 3D convolution kernel connected to the kth feature map in the previous layer, b ij Represents the bias parameter.

[0083] Assumptions Figure 6 In the three-dimensional convolution module, a total of L cThere are three-dimensional convolutional layers. The mathematical expressions between the two layers are listed below.

[0084]

[0085] where x (l-1) is the input of the lth layer, f represents the activation function, is the corresponding 3D convolution operation, W l and B l They represent the three-dimensional convolution kernel and bias parameters respectively.

[0086] (2) Residual network module: The residual network can effectively solve the problem of network degradation. After the three-dimensional convolution module fully extracts information in the time dimension, we adopt a residual network structure that does not add extra computational effort to the network and is easier to train.

[0087] like Figure 7 As shown, each residual module consists of two activation functions and two 2D convolution operations. The mapping in the residual unit is represented as f, and L is stacked after the 3D convolution module. r residual units, formally,

[0088]

[0089] where θ l represents the set of all learnable parameters in the lth residual unit, is the input of the lth residual unit.

[0090] (3) Attention mechanism module: The inspiration of the attention mechanism comes from the study of human vision, that is, to prioritize the limited visual information processing resources to the key parts and ignore irrelevant information. Adjacent regions in the entire space have different effects on the final prediction results. We attribute this effect to spatial heterogeneity. This is very consistent with the soft attention in the field of image processing. According to the degree of attention paid to each region, each region is given a learnable parameter between 0 and 1 and can be differentiated. The optimal weight can be determined through the forward propagation and backward feedback of the neural network.

[0091] In this paper, in order to further improve the ability of the model, a Figure 8 The soft attention mechanism module of SENET (Squeeze-and-Excitation Networks) shown in the figure is embedded into the last part of the overall network structure to explore and automatically quantify the contribution of channel-level features to each region. This module recalibrates the original features at the channel level.

[0092] Figure 2The overall workflow of the developed method is shown. For the control equations to be solved, implicit large eddy simulation is performed. The NS equations are first spatially discretized using the discontinuous Galerkin method, and then the unsteady time advancement is completed using implicit time discretization. The Newton method is used for iterative calculations within a single time step. The resulting large linear system is calculated using the preprocessed GMERS method to obtain the data required for training, that is, the high-order expression coefficients. It is worth noting that the high-order functions constructed on the corresponding units can represent the flow field information at any point in the grid. After completing the construction of the training sample set, the neural network is trained until the accuracy requirements are met.

[0093] In the embodiment, select Fig. 9 The two points P1 (1.5, 0) and P2 (5, 0.5) shown in the figure show the prediction accuracy of the time series. The three physical quantities u, v, and p predicted by the deep neural network at the selected position are compared with the real samples, and the relative error results are obtained as follows: Figure 10-12 , where the ordinate in the relative error curve represents the mean percentage error (MAPE, Mean Absolute Percentage Error), and the expression is as follows:

[0094]

[0095] In the above formula, N represents the total number of data. is the predicted value, and y is the corresponding true value calculated by CFD. All the predicted results are in good agreement with the CFD calculation results. As the number of recursive prediction steps increases, the cumulative error has little effect on the prediction results. The rationality of each module of the hybrid deep neural network proposed in this paper is proved, which can capture the expected flow field characteristics and realize the prediction of unsteady flow field.

[0096] Table 1 below shows the comparison of training and testing time of the developed method for unsteady flow field prediction under two different working conditions.

[0097]

[0098] Table 1

[0099] In terms of computational time, the specific information of CFD calculation and deep network training and testing is shown in Table 1 (the hardware for CFD calculation is Intel Xeon E5649 2.53GHz 4-core parallel, which uses parallel computing, and the hardware for neural network prediction is Intel Xeon Silver 4210R 2.40GHz 40-core parallel, which does not use parallel computing). It can be found that in the second example, the CFD numerical simulation takes 7500s for one cycle, and the unsteady flow field prediction method based on the deep learning strategy takes 60s to predict one cycle after training. The time required for model prediction in all examples has been reduced by more than two orders of magnitude, which can significantly save computing costs.

[0100] This embodiment can be used for intelligent acceleration of numerical simulation in high-order DG numerical format, can be used in the field of computational fluid dynamics and numerical simulation, can improve the time efficiency of solving flow field systems, and also improve the utilization rate of computing resources. Traditional high-fidelity calculation methods have limiting factors such as long calculation cycles. The present invention uses a hybrid neural network to predict the holographic flow field, and provides a new deep learning flow field modeling idea for the field of fluid mechanics engineering applications. The present invention includes: the user can input the flow field working condition information on the client. After the initialization operation, the CFD server constructs a calculation framework (compressible or incompressible), uses a high-order DG algorithm to perform numerical simulation, and constructs an overall training sample set for training based on the calculation grid and its adjacent relationship. Train the hybrid neural network on the GPU computing power platform to obtain the flow field prediction model, and verify the prediction accuracy. If the accuracy does not meet the engineering application requirements, adjust the model or retrain, and return the finalized network to the CFD server. The network can be called to achieve the purpose of improving the computing efficiency. The intelligent acceleration results that meet the engineering application accuracy requirements are returned to the client visualization interface. Thus, both the allocation of computing power and the accuracy and efficiency of flow field calculation can be improved. This makes it possible to take into account both the computational efficiency and accuracy of the simulation during the flow field analysis process, thereby improving the efficiency of the entire flow field analysis system and the utilization of computing resources. This improves both the computational efficiency of each case and the effectiveness of computing power allocation.

[0101] This embodiment also provides an acceleration device for flow field prediction, such as Fig.14 As shown, including:

[0102] The receiving module is used to receive the initial flow field condition data sent by the client, wherein the flow field condition data at least includes: the incoming flow angle of attack, the incoming flow Mach number and the Reynolds number of the flow field at the initial moment.

[0103] The calculation preparation module is used to establish a calculation framework for the flow field and use the calculation framework to obtain training data, wherein the training data includes: flow field information divided by time and high-order expression coefficients corresponding to the flow field information.

[0104] The preprocessing module is used to arrange the training data according to the spatial adjacent relationship of each unit in the calculation grid, and then construct a training sample set according to the sequential relationship of the data generated by the calculation framework.

[0105] The training module is used to train the neural network through the training sample set until the prediction accuracy reaches the engineering application requirements.

[0106] The prediction module is used to generate a prediction sample set according to the current flow field condition data, and input the set into the trained neural network to obtain the prediction result output by the trained neural network.

[0107] The acceleration method and device for flow field prediction provided by the embodiment of the present invention can allow users to input flow field condition information on the client. After the initialization operation, the CFD server constructs a calculation framework (compressible or incompressible), uses a high-order DG algorithm to perform numerical simulation, and constructs a total training sample set for training based on the calculation grid and its adjacent relationship. Train a hybrid neural network on the GPU computing power platform to obtain a flow field prediction model, and verify the prediction accuracy. If the accuracy does not meet the requirements of engineering applications, adjust the model or retrain, and return the final network to the CFD server. The purpose of improving the calculation efficiency can be achieved by calling the network. The intelligent acceleration results that meet the accuracy requirements of engineering applications are returned to the client visualization interface. The present invention is suitable for the industrial application scenario of quickly and accurately obtaining unsteady flow fields. It can improve the time efficiency of solving the flow field system and also improve the utilization rate of computing resources. Traditional high-fidelity calculation methods have limiting factors such as long calculation cycles. This embodiment uses a hybrid neural network to predict the holographic flow field, which provides a new deep learning flow field modeling idea for the field of fluid mechanics engineering applications.

[0108] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The above is only a specific implementation method of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or replacements that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An acceleration method for flow field prediction, characterized in that: include: S1. The CFD server receives initial flow field condition data sent by the client, wherein the flow field condition data at least includes: an incoming flow angle of attack, an incoming flow Mach number, and a Reynolds number of the flow field at an initial moment; S2. Establishing a computational framework for the flow field, and using the computational framework to obtain training data, the training data including: flow field information divided by time and high-order expression coefficients corresponding to the flow field information; S3, arranging the training data according to the spatial adjacency relationship of each unit in the computational grid, and then constructing a training sample set according to the order in which the data is generated by the computational framework; S4. Training the neural network using the training sample set until the prediction accuracy meets the engineering application requirements; S5. Generate a prediction sample set based on the current flow field condition data, and input the sample set into the trained neural network to obtain a prediction result output by the trained neural network; The process of obtaining training data using the computing framework includes: Using implicit large eddy simulation, numerical simulation of the control equations in the computational framework is performed; The computational framework is spatially discretized using a discontinuous Galerkin method, and then the computational framework is subjected to unsteady time advancement through implicit time discretization, and the high-order expression coefficients are further obtained, wherein Newton's method is used for iterative calculation within a single time step; The training of the neural network using the training sample set includes: Establishing a three-dimensional convolutional neural network module and a deep residual convolutional network module of the neural network; Embed the soft attention mechanism module into the last part of the neural network; Randomly initializing network parameters and inputting a training sample set into the neural network; The weights and bias coefficients are optimized by minimizing the loss function to correct the weight of each neuron, where the loss function is: , N g represents the total number of training data, λ represents the regularization coefficient, Represents the predicted value of the deep neural network, Y i Represents the CFD calculation results at the same time, w represents the weight coefficient, Represents the square of the 2-norm of the weight coefficient.

2. The method according to claim 1, characterized in that The control equations include: Among them, U represents the conserved variable, t represents the time variable, and F c (U) represents the inviscid flux, u and v represent the orthogonal components of the velocity, represents the viscous flux; In the two-dimensional case, the conserved variable U is: Where ρ represents the pressure at a point in the flow field, u and v represent the orthogonal components of the velocity, and E represents the unit total energy.

3. The method according to claim 2, characterized in that The spatial discretization of the computational framework using the discontinuous Galerkin method includes: The calculation framework is spatially discretized using the discontinuous Galerkin method, and the obtained discrete form is: 0≤j≤n,φ j is the basis function, is the auxiliary variable introduced, Auxiliary numerical flux introduced in the boundary integral part, Ω e Represents a unit, Represents unit Ω e The boundary of the unit, n represents the outer normal vector of the unit boundary, U h represents a conserved variable, is the viscous numerical flux j represents the subscript of the basis function, Θ - and Θ + Represent the variable values ​​of the left and right units of the interface, F represents the integral of the diffusion term inside the unit, Θ h represents auxiliary variables, σ represents the boundary of the calculation area, Indicates the value of a variable, represents the integral of the diffusion term at the unit boundary; The discrete system of the calculation framework obtained from the discrete form is: Where M is the global mass matrix, u=[u1,u2,...,u k ,...,u Nele ] T is the global degree of freedom vector, u k represents the degree of freedom of unit k, u k =[u 1,1 ,u 1,2 ,…,u 1,Nd ,…,u k,1 ,…,u k,Nd ,…,u Ne,1 …,u Ne,Nd ] T , where Nele represents the number of global units, Ne, Nd represent the number of equations in the unit and the degree of freedom of each variable, respectively, R(u) = [R1, R2, ..., R k , ..., R Nele ] T is the global residual vector, R k Represents the residual value vector of unit k.

4. The method according to claim 3, characterized in that Also includes: The computational domain is divided by structured grids, and the variable U is conserved within the grid cells. h (x, t) is Among them, u j (t) is the original variable in the form of high-order coefficients, φ j (x) is the basis function corresponding to the high-order expression coefficient, and N is the number of basis functions of the corresponding order.

5. The method according to claim 4, characterized in that In the process of performing unsteady time advancement on the computational framework through implicit time discretization, the following steps are included: The residual value item is t n+1 The residual value of the time step is calculated, and the discrete system of the calculation framework is processed by the backward Euler difference method to obtain: Among them, t n+1 The unsteady residual value R e for: At each time step t n+1 Newton iteration is used to solve until the residual value R e (u k ) infinitely approaches 0.

6. The method according to claim 5, characterized in that Constructing a training sample set according to the order in which the data is generated by the computing framework includes: The flow field information at each moment is evenly calibrated in a rectangular space of fixed size; At each time step, the conserved variable U is extracted and calculated in each grid cell, where the required interpolation polynomial coefficient is u j (t) (j=1, ..., 10), each grid cell contains 40 high-order expression coefficients when the third-order format is adopted.