CN114880897A - Unsteady flow field grid adaptive analysis method based on machine learning - Google Patents
Unsteady flow field grid adaptive analysis method based on machine learning Download PDFInfo
- Publication number
- CN114880897A CN114880897A CN202210430204.3A CN202210430204A CN114880897A CN 114880897 A CN114880897 A CN 114880897A CN 202210430204 A CN202210430204 A CN 202210430204A CN 114880897 A CN114880897 A CN 114880897A
- Authority
- CN
- China
- Prior art keywords
- grid
- discontinuity
- initial
- node
- flow field
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004458 analytical method Methods 0.000 title claims abstract description 16
- 238000010801 machine learning Methods 0.000 title claims abstract description 10
- 230000003044 adaptive effect Effects 0.000 title claims description 11
- 238000000034 method Methods 0.000 claims abstract description 56
- 238000012549 training Methods 0.000 claims abstract description 32
- 238000004364 calculation method Methods 0.000 claims abstract description 27
- 238000013528 artificial neural network Methods 0.000 claims abstract description 14
- 238000009826 distribution Methods 0.000 claims abstract description 7
- 238000009499 grossing Methods 0.000 claims abstract description 7
- 230000006870 function Effects 0.000 claims description 30
- 238000012545 processing Methods 0.000 claims description 15
- 238000005259 measurement Methods 0.000 claims description 11
- 239000012530 fluid Substances 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 5
- 239000000126 substance Substances 0.000 claims description 5
- 239000011159 matrix material Substances 0.000 claims description 4
- 239000006185 dispersion Substances 0.000 claims description 3
- 230000000694 effects Effects 0.000 claims description 2
- 230000000737 periodic effect Effects 0.000 claims description 2
- 238000007781 pre-processing Methods 0.000 claims description 2
- 210000004027 cell Anatomy 0.000 description 19
- 210000002569 neuron Anatomy 0.000 description 9
- 230000005540 biological transmission Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000004907 flux Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 230000036961 partial effect Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000002829 reductive effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000012886 linear function Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 230000035939 shock Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/23—Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/28—Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/08—Fluids
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/14—Force analysis or force optimisation, e.g. static or dynamic forces
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T90/00—Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computing Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Mathematical Physics (AREA)
- Computer Hardware Design (AREA)
- Geometry (AREA)
- Evolutionary Biology (AREA)
- Medical Informatics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Fluid Mechanics (AREA)
- Algebra (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention discloses an unsteady flow field grid self-adaptive analysis method based on machine learning, relates to the technical field of flow field analysis, and can efficiently and accurately analyze an unsteady flow field, save the occupation amount of equipment resources and reduce the calculation cost. The invention comprises the following steps: solving an equation in an initial flow field by using a DG method, and counting to obtain grid discontinuity quantity; constructing a Binary classifier to classify the grid data, and training a BP neural network regression model to predict the discontinuity of any node according to the initial grid information and the discontinuity; the variable method based on MMPDE moves the grid node to make it accord with the discontinuous quantity distribution condition in statistical sense; optimizing the grid quality by using a Laplacian smoothing method; and finally, returning the obtained grid information to the CFD computing client.
Description
Technical Field
The invention relates to the technical field of flow field analysis in fluid mechanics, in particular to an unsteady flow field grid self-adaptive analysis method based on machine learning.
Background
CFD (Computational Fluid Dynamics) is an analog simulation subject related to flow, which is deep into various industrial technical fields, and with the development of computer technology, modeling and operation methods based on CFD are widely used.
In practical application, for simple flow fields, accurate calculation and analysis can be achieved by traditional processing means. However, once the analysis scene of the flow field is complex, for example, there are complex unsteady flow fields such as shock waves and turbulence, such a flow has the characteristics of a multi-scale structure, a suitable grid cannot be provided by the conventional processing means, the grid is adjusted only by manual experience, the accuracy is low, the occupied computing resources are large, and stable and accurate computation and analysis cannot be achieved, so that a grid adaptive partitioning technology needs to be researched to improve the solving precision, thereby reducing the computing time and saving the operating memory.
The existing unsteady flow field grid self-adaptive method mostly uses a local encryption method, and a grid is locally refined according to some error indexes, so that a large amount of grid nodes are generally required to be increased, the grid topological structure is changed, and a large amount of computing resources are occupied. In addition, most adaptive methods perform grid adjustment once every a period of time, and each adjustment reduces the time difference through multiple times of interpolation, so that the error of numerical interpolation transmission is increased. These factors lead to increased computational cost and decreased computational efficiency.
In general, the existing processing means is applied to actual scientific research and production, the unsteady flow field cannot be efficiently and accurately analyzed, and the problems of large occupation amount of equipment resources and high calculation cost exist.
Disclosure of Invention
The embodiment of the invention provides a machine learning-based unsteady flow field grid adaptive analysis method, which can efficiently and accurately analyze an unsteady flow field, save the occupation amount of equipment resources and reduce the calculation cost.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
s1, receiving initial information of the flow field sent by the client, wherein the initial information comprises initial grid parameters, object plane geometric information and initial flow field conditions;
s2, initializing the initial information, wherein the data obtained after initialization comprises initial grid information and initial grid discontinuity quantity;
s3, carrying out grid self-adaptive processing by using the initialized data;
and S4, performing CFD calculation on the grid subjected to the grid self-adaptive processing, and returning the calculation result to the client.
According to the unsteady flow field grid adaptive analysis method based on machine learning provided by the embodiment of the invention, an equation is solved in an initial flow field by using a DG (discrete Galerki) method, grid discontinuity quantity is obtained through statistics, a Binary classifier is constructed to classify grid data, a BP neural network regression model is trained according to initial grid information and the discontinuity quantity to predict any node discontinuity quantity, a grid node is moved to meet the discontinuity quantity distribution condition in a statistical sense based on a variation method of an MMPDE (Moving mesh partial differential equations), grid quality optimization is carried out by using a Laplacian smoothing method, and finally obtained grid information is returned to a Computational Fluid Dynamics (Computational Fluid Dynamics) computation client. The invention reduces the self-adaptive calculation amount of the traditional grid, does not change the topological structure of the grid, does not need to update the flow field solution of grid calculation for many times, and does not influence the complexity of the algorithm while ensuring the calculation precision. Therefore, the problems that the unsteady flow field cannot be efficiently and accurately analyzed, the occupied amount of equipment resources is large, and the calculation cost is high are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a general flowchart of an unsteady flow field grid adaptive method based on machine learning according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a neuron of a neural network model according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an interaction method provided by an embodiment of the invention;
fig. 4 is a schematic flow chart of a method according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or coupled. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The embodiment may be implemented in an interaction scenario as shown in fig. 1, and may be specifically implemented as a system for performing interaction between a server and a client. For example: an interactive environment between a client running on a researcher's computer and a server device. The server completes initial grid generation and initial CFD calculation operation according to the information, implements the grid self-adaptive method according to the result, and finally returns the flow field numerical calculation result meeting the precision requirement to the client.
The embodiment of the invention provides an unsteady flow field grid adaptive analysis method based on machine learning, as shown in fig. 4, comprising the following steps:
and S1, the server receives the initial information of the flow field sent by the client.
Wherein the initial information comprises initial grid parameters, object plane geometric information and initial flow field conditions.
And S2, initializing the initial information, wherein the data obtained after initialization comprises initial grid information and initial grid discontinuity quantity.
Wherein the initialization process includes: and generating an initial grid and a statistical discontinuity quantity by using the initial information.
And S3, carrying out grid self-adaptive processing by using the initialized data.
And S4, performing CFD calculation on the grid subjected to the grid self-adaptive processing, and returning the calculation result to the client.
Specifically, S2 includes:
and S21, generating an initial grid according to the initial information.
And S22, obtaining the discontinuity quantity in the appointed time on the initial grid by using a DG finite element method discrete flow field equation.
The boundary discontinuity quantity of each unit is quantized through a local lifting operator and an overall lifting factor in a BR2 format, and the boundary discontinuity quantity is used as an index for whether the density of a quantization grid is good or bad. Specifically, the local lifting operator in the BR2 format is usedAnd quantizing and calculating the boundary discontinuity quantity of each unit by using the overall lifting factor Rh, and quantizing the condition of grid density by using the boundary discontinuity quantity as an index.
And S23, counting the discontinuous quantity in the initial grid according to the flow field solution of the initial grid until a periodic unsteady effect appears.
In this embodiment, the initial grid is a grid T of a physical domain Ω h There are N units, each unit is denoted as K, and the node is denoted as x. In S22, the method includes: performing space dispersion on the N-S equation by adopting a DG finite element method to obtain high-order format expression of the conservation variable:wherein, U h (x, t) is a function of cell and time, is a high order expression of the governing equation, u j (t) represents the equation variables and as the coefficients to be solved, represents the degree of freedom of the numerical solution in each cell, phi j (x) Representing basis functions, spatially discrete; theta h (x, t) denotes auxiliary variablesHigh-order expression of (1), U being a conservative variable, theta j (t) is a function of the auxiliary variable theta with respect to the jth basis function and time t, N represents the number of time basis functions of order p, x represents the coordinates of node x,h denotes a high order format table, j denotes the number of basis functions, and t denotes time.
Wherein the amount of discontinuity of the unit is characterized by an overall boost factor,wherein the content of the first and second substances,is a boundary set of cells, e is any one boundary of a cell,is the local lifting factor of the cell at the boundary e. Due to the overall lifting factor R h In units of a polynomial distribution, R h The quantity of the corresponding fluid density ρ is integrated in the cell to obtain R E And R is E As a grid discontinuity, i.e.Wherein R is h,l Amount of p, S for the overall boost factor E Is a unit area, | · includes 2 Is L2 norm, E is the total energy per unit mass, [ integral ] f E R h,l d Ω denotes R for each unit over the computational domain Ω h,1 And (4) integrating.
As shown in fig. 1, for example, the initial information of the input flow field includes initial grid parameters, object plane geometry information, and initial flow field conditions. The initialization processing comprises the steps of generating initial grids and counting the discontinuity quantity, and the initialized data comprises initial grid information and initial grid discontinuity quantity. Specifically, the generated initial grid is the grid T of the physical domain Ω h There are N units, each unit is denoted as K, and the node is denoted as x. The Navier-Stokes equation for compressible viscous flow in conservative form can be expressed as:wherein U is a conservation variable and the specific expression isρ is the fluid density, u and v are the velocity components, respectively, p is the fluid pressure, and E is the total energy per unit mass. F c (U) is the non-viscous flux,is a viscous flux. In order to make the above equation system closed, the ideal gas state equation needs to be supplementedρ is the density of the fluid, u and v are the velocity components, p is the pressure of the fluid, E is the total energy per unit mass, and the specific heat capacity ratio γ of air is c in normal state p /c v =1.4。
Introducing auxiliary variables by adopting BR2 format proposed by Bassi and RebayPerforming space dispersion on the N-S equation by adopting a DG finite element method to obtain high-order format expression of the conservation variable:in the formula u j (t) represents the variables of the equation, representing the degrees of freedom of the numerical solution in each cell, phi j (x, y) are the corresponding basis functions, and N represents the number of time basis functions of order p. The solutions U to the governing equation are separately discretized in space and time, where U j (t) is a function with respect to time, i.e. the coefficient to be solved, and j (x, y) are spatially discrete.
A non-viscous value flux and a viscous value flux are introduced,andrespectively representing the values of the variables of the left cell and the right cell of the interface, havingPartially integrating the N-S equation to obtainFrom the above analysis, it was found that the DG method allows for discontinuities between cells, the gradients of the variables within the cells andare not equivalent, so local lifting operators are introducedAnd an overall lifting factor R h Respectively consist ofAndobtained in the formulaIs a boundary set of the unit K, e is any one boundary of the unit K, U h A node flow field value U obtained by solving an N-S equation in a discrete space by an initial grid representing a calculation domain omega - h The value of the side flow field inside the cell interface is indicated,is the basis function of the polynomial space over the unit K, K being the highest order of the basis function of the polynomial space,is the local lifting factor of cell K at boundary e.
Characterizing the amount of discontinuity of the cell by the overall boost factor, due to the overall boost factor R h Is distributed in a polynomial in a unit, wherein R is obtained by integrating the quantity of rho corresponding to the overall lifting factor in the unit E I.e. grid discontinuity quantity, recording the total lifting factor corresponding rho h Is an amount of R h,1 In which S is E Is a unit area,||·|| 2 Is L2 norm, R E Is of the formula
In this embodiment, S3 includes:
and S31, preprocessing the initial grid discontinuity quantity in the initialized data to obtain the preprocessed discontinuity quantity. The initial grid discontinuity quantity is preprocessed so that the size distribution of the discontinuity quantity is more consistent with the actual flow field change condition. The initial grid discontinuity amount in the initialized data can be processed according to the drastic position of the actual flow field data change, wherein the far-field initial discontinuity amount is reduced, and the discontinuity amount is smoothed, so that the influence of initial manual setting conditions and calculation errors is reduced.
S32, inputting the preprocessed discontinuity quantity and the initial grid information into a Binary classifier, and then outputting a classification result of the grid node by the Binary classifier.
And S33, obtaining the measurement tensors of all grid nodes of the initial grid, and scaling according to the classification result output by the Binary classifier.
And S34, updating the discontinuity quantity and the measurement tensor of the grid node in each iteration, and then updating the coordinates of the grid node according to the initial grid information and the measurement tensor of the grid node until the coordinate information of the self-adaptive grid node is obtained. And updating the coordinates of the grid nodes according to the initial grid information and the measurement tensor of the grid nodes, performing iteration for multiple times, updating the discontinuity quantity and the measurement tensor of the current grid nodes during each iteration, and performing quality optimization on the finally adjusted grid to obtain the coordinate information of the self-adaptive grid nodes.
Further, before S32, the method further includes:
and taking the node coordinates of the initial grid and the preprocessed discontinuity quantity as training data, wherein in the training data, the node coordinates of the initial grid are taken as training input, and the preprocessed discontinuity quantity is taken as a label of the training data. Using the trainingTraining a BP neural network regression model by data, and storing the trained BP neural network regression model into a server, wherein a loss function for supervising training isN represents the number of training samples, y (i) represents the label corresponding to the ith training data,representing the output of the regression model on the ith training data.
In this embodiment, the initial grid information and the preprocessed discontinuity quantity are respectively used as an input and a label of training data to train the BP neural network regression model, and the trained BP neural network regression model is stored in the server. Specifically, in order to ensure that the neural network completes the non-linear fitting, each neuron needs to select a non-linear function as an activation function, such as the neuron diagram shown in fig. 2, where the input is x 1 ,x 2 ,x 3 ,w i The weight of the connection between neurons. And the transmission function tan-sigmoid function of the hidden layer neuron and the transmission function of the output layer are log-sigmoid functions. And reversely estimating the prediction error of the neuron of the previous hidden layer by using the BP through the prediction error of the neuron of the output layer, reversely transmitting the error from the output layer to the hidden layer by layer, and finally transmitting the error to the input layer, thereby realizing the adjustment of the connection weight, wherein the training function of the reverse transmission is a train lm function. Using gradient descent method to update weight of neuron connection so as to reduce loss function of supervised trainingSize, N denotes the number of training samples, y (i) Indicates the label value corresponding to the ith training data,representing the output of the regression model on the ith training data. At the same time, the proper learning rate eta is set, so the weight value is adjustedA difference ofIn the formula, the negative sign represents gradient decrease, eta is learning rate, learning rate in BP neural network is constant,is the partial derivative of the error with respect to the current weight. The partial derivatives of the errors to the weight of each neuron can be solved by using a chain rule, a new weight is obtained by the weight adjustment difference value, forward propagation is continued, and the next weight adjustment is carried out until the output error of the network is smaller than a preset value or the training times reach a preset learning time.
And constructing training data by using the preprocessed grid discontinuity quantity and a set high discontinuity quantity threshold, wherein the Binary classifier is used for judging whether the node is a high discontinuity quantity node or not, and storing the trained Binary classifier into the server. The goal of the Binary classifier is to classify all grid nodes, and the Binary classifier constructs training data by using the preprocessed grid discontinuity quantity and the set high discontinuity quantity threshold. The Binary classifier is used for judging whether the node is a high-discontinuity node, and the nodes meeting the high-discontinuity are satisfied: DG i >λ × AverageDG, where λ represents a set threshold λ ═ 1.4, DG i Representing a node x i Where AverageDG represents the average value of the discontinuity amounts of the training data, and i is a positive integer.
In S33, the acquired metric tensors of all grid nodes of the initial grid areWhere d denotes the dimension of the computational domain of the grid, q denotes the error norm, m is the order of the derivative of the error norm, H i Is node x i The hessian matrix of the amount of discontinuity. In the process of scaling according to the classification result output by the Binary classifier, the method comprises the following steps: m' i =λ M M i Wherein M is i Representing the tensor of the metric before scaling, M′ i Representing the metric tensor, λ, after one round of scaling M To control the factor, λ M For the set threshold, the spatial distribution of the metric tensor is more reasonable to reflect the change characteristic of the flow field according to the uniform distribution criterion.
And in each iteration of S34, including:
and S341, updating grid node coordinates by an MMPDE variation method, predicting the discontinuity quantity of the current grid node by using the BP neural network regression model in each iteration, and recalculating the measurement tensor. Wherein a mesh functional I [ xi ] with a metric tensor is established]═ G (J, det (J), M, x) dx wherein,the jacobian matrix represents ξ (x), x represents a physical grid node, ξ represents a computational grid node corresponding to x, G represents a given smooth function, and M represents a metric tensor. Obtaining an extreme value of the grid functional to obtain a corresponding relation phi between the physical grid and the computational grid, wherein x is phi (xi), andthe new physical grid isWherein the content of the first and second substances,in the case of the current physical grid,in order to be the current computational grid,the grid is calculated for the standard.
And S342, optimizing the quality of the moved grid by a Laplacian smoothing method. Which comprises the following steps: processing the moved grid by a Laplacian smoothing method, wherein the updated node obtained after each processing isWherein the content of the first and second substances,representing a node x i The set of contiguous cells of (a) is,representing the number of adjacent cells, k representing a grid cell, x j And x l Representing node x in cell k i Adjacent point of (2), x m Denotes x in the unit k i The pair of vertices of (a) is,factor alpha i Represents the area S of the cell k k Normalizing the result by a factor beta k To represent
The existing unsteady flow field grid self-adaptive method mostly uses a local encryption method, and a grid is locally refined according to some error indexes, so that a large amount of grid nodes are generally required to be increased, the grid topological structure is changed, and a large amount of computing resources are occupied. In addition, most adaptive methods perform grid adjustment once every a period of time, and each adjustment reduces the time difference through multiple times of interpolation, so that the error of numerical interpolation transmission is increased. These factors lead to increased computational cost and decreased computational efficiency. In general, the existing processing means is applied to actual scientific research and production, the unsteady flow field cannot be efficiently and accurately analyzed, and the problems of large occupation amount of equipment resources and high calculation cost exist. When computing resources are in shortage and a plurality of experiments need to be performed by queuing the server equipment, great inconvenience is caused.
The scheme provided by the embodiment is suitable for unsteady flow field analysis, and can improve the computational accuracy of unsteady flow field analysis on the premise of not changing the topological structure of the grid and not needing to update the grid computational flow field solution for many times. Solving an equation in an initial flow field by using a DG method, and counting to obtain grid discontinuity quantity; constructing a Binary classifier to classify the grid data, and training a BP neural network regression model to predict the discontinuity of any node according to the initial grid information and the discontinuity; the variable method based on MMPDE moves the grid node to make it accord with the discontinuous quantity distribution condition in statistical sense; optimizing the grid quality by using a Laplacian smoothing method; and finally, returning the obtained grid information to the CFD computing client. The invention reduces the calculation amount of the traditional grid self-adaptation, and does not influence the complexity of the algorithm while ensuring the calculation precision. In the embodiment, as shown in fig. 1, in the initialization process, the discontinuity amount obtained by discrete NS equation statistics on the initial grid is input into the grid adaptive module based on machine learning; in the self-adaptive process, initial discontinuity quantity is preprocessed, and the discontinuity quantity corresponding to the updated grid node does not need CFD calculation after each movement, but is predicted by using the trained neural network regression model stored in the server; after multiple iterations, performing quality optimization on the final grid when the precision requirement is met; and finally, CFD solving is carried out, and a calculation result is returned to the client. The invention completes the grid self-adaptive adjustment of the unsteady flow field, improves the calculation precision, and compared with the traditional grid self-adaptive method, the grid self-adaptive module in the invention is independent of the CFD calculation module, and does not influence the calculation complexity.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. An unsteady flow field grid adaptive analysis method based on machine learning is characterized by comprising the following steps:
s1, receiving initial information of the flow field sent by the client, wherein the initial information comprises initial grid parameters, object plane geometric information and initial flow field conditions;
s2, initializing the initial information, wherein the data obtained after initialization comprises initial grid information and initial grid discontinuity quantity;
s3, carrying out grid self-adaptive processing by using the initialized data;
and S4, performing CFD calculation on the grid subjected to the grid self-adaptive processing, and returning the calculation result to the client.
2. The method according to claim 1, wherein in S2, comprising:
s21, generating an initial grid according to the initial information;
s22, obtaining the discontinuity quantity in the designated time on the initial grid by using a DG finite element method discrete flow field equation, wherein the boundary discontinuity quantity of each unit is quantized through a local lifting operator and an overall lifting factor in a BR2 format, and the boundary discontinuity quantity is used as an index for quantizing the conditions of density and density of the grid;
and S23, counting the discontinuous quantity in the initial grid according to the flow field solution of the initial grid until a periodic unsteady effect appears.
3. The method of claim 2, wherein the initial grid is a grid T of a physical domain Ω h N units are provided, each unit is marked as K, and a node is marked as x;
in S22, the method includes: performing space dispersion on the N-S equation by adopting a DG finite element method to obtain high-order format expression of the conservation variable:wherein, U h (x, t) is a function of cell and time, is controlHigh order expression of system equation, u j (t) represents the equation variables and as the coefficients to be solved, represents the degree of freedom of the numerical solution in each cell, phi j (x) Representing basis functions, spatially discrete; theta h (x, t) denotes auxiliary variablesHigh-order expression of (1), U being a conservative variable, theta j (t) is a function of theta related to the jth base function and time t, N represents the number of p-order base functions, x represents the coordinates of nodes, h represents a high-order format table, j represents the serial number of the base functions, and t represents time;
wherein the amount of discontinuity of the unit is characterized by an overall boost factor,wherein the content of the first and second substances,is a boundary set of cells, e is any one boundary of a cell,is the local lifting factor of the cell at the boundary e. Due to the overall lifting factor R h In units of a polynomial distribution, R h The quantity of the corresponding fluid density ρ is integrated in the cell to obtain R E And R is E As a grid discontinuity, i.e.Wherein R is h,1 Amount of p, S for the overall boost factor E Is a unit area, | · includes 2 Is L2 norm, E is the total energy per unit mass, [ integral ] f E R h,1 d Ω denotes R for each unit over the computational domain Ω h,1 And (4) integrating.
4. The method according to claim 1, wherein in S3, comprising:
s31, preprocessing the initial grid discontinuity quantity in the initialized data to obtain a preprocessed discontinuity quantity;
s32, inputting the preprocessed discontinuity quantity and the initial grid information into a Binary classifier, and then outputting a classification result of grid nodes by the Binary classifier;
s33, obtaining the measurement tensors of all grid nodes of the initial grid, and scaling according to the classification result output by the Binary classifier;
and S34, updating the discontinuity quantity and the measurement tensor of the grid node in each iteration, and then updating the coordinates of the grid node according to the initial grid information and the measurement tensor of the grid node until the coordinate information of the self-adaptive grid node is obtained.
5. The method of claim 4, further comprising, prior to S32:
taking the node coordinates of the initial grid and the preprocessed discontinuity quantity as training data, wherein in the training data, the node coordinates of the initial grid are taken as training input, and the preprocessed discontinuity quantity is taken as a label of the training data;
training a BP neural network regression model by using the training data, and storing the trained BP neural network regression model into a server, wherein a loss function for supervising the training isN represents the number of training samples, y (i) represents the label corresponding to the ith training data,representing the output of the regression model on the ith training data.
6. The method according to claim 4, wherein the goal of the Binary classifier is to classify all mesh nodes, and the Binary classifier constructs training data by using the preprocessed mesh discontinuity amount and the set high discontinuity amount threshold;
the Binary classifier is used for judging whether the node is a high-discontinuity node, and the nodes meeting the high-discontinuity are satisfied: DG i >λ × AverageDG, where λ represents a set threshold λ ═ 1.4, DG i Representing a node x i Where AverageDG represents the average value of the discontinuity amounts of the training data, and i is a positive integer.
7. The method according to claim 4, wherein in S33, the acquired metric tensors of all grid nodes of the initial grid areWhere d denotes the dimension of the computational domain of the grid, q denotes the error norm, m is the order of the derivative of the error norm, H i Is node x i A hessian matrix of the amount of discontinuity;
in the process of scaling according to the classification result output by the Binary classifier, the method comprises the following steps: m' i =λ M M i Wherein M is i Representing the metric tensor, M 'before scaling' i Representing the metric tensor, λ, after one round of scaling M To control the factor, λ M Is a set threshold.
8. The method of claim 5, wherein in each iteration of S34, comprising:
s341, updating grid node coordinates by an MMPDE variation method, predicting the discontinuity quantity of the current grid node by using the BP neural network regression model in each iteration, and recalculating the measurement tensor;
and S342, optimizing the quality of the moved grid by a Laplacian smoothing method.
9. The method according to claim 8, wherein in S341, the method comprises:
building a mesh with metric tensorsLattice functional I [ xi ]]═ G (J, det (J), M, x) d.x where,the method comprises the following steps of (1) representing a Jacobian matrix of xi (x), wherein x represents a physical grid node, xi represents a calculation grid node corresponding to x, G represents a given smooth function, and M represents a measurement tensor;
obtaining an extreme value of the grid functional to obtain a corresponding relation phi between the physical grid and the computational grid, wherein x is phi (xi), andthe new physical grid isWherein the content of the first and second substances,in the case of the current physical grid,in order to be the current computational grid,the grid is calculated for the standard.
10. The method of claim 8, wherein in S342, comprising:
processing the moved grid by a Laplacian smoothing method, wherein the updated node obtained after each processing is
Wherein x is i The nodes are represented as a list of nodes,representing a node x i Is adjacent toAnd then the unit is collected into a unit set,representing the number of adjacent cells, k representing a grid cell, x j And x l Representing node x in cell k i Adjacent point of (2), x m Denotes x in the unit k i The pair of vertices of (a) is,factor alpha i Represents the area S of the cell k k Normalizing the result by a factor beta k To represent
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210430204.3A CN114880897A (en) | 2022-04-22 | 2022-04-22 | Unsteady flow field grid adaptive analysis method based on machine learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210430204.3A CN114880897A (en) | 2022-04-22 | 2022-04-22 | Unsteady flow field grid adaptive analysis method based on machine learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114880897A true CN114880897A (en) | 2022-08-09 |
Family
ID=82671370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210430204.3A Pending CN114880897A (en) | 2022-04-22 | 2022-04-22 | Unsteady flow field grid adaptive analysis method based on machine learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114880897A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7191161B1 (en) * | 2003-07-31 | 2007-03-13 | The United States Of America As Represented By The Administrator Of The National Aeronautics And Space Administration | Method for constructing composite response surfaces by combining neural networks with polynominal interpolation or estimation techniques |
CN110222828A (en) * | 2019-06-12 | 2019-09-10 | 西安交通大学 | A kind of Unsteady Flow method for quick predicting based on interacting depth neural network |
CN113221475A (en) * | 2021-04-02 | 2021-08-06 | 南京航空航天大学 | Grid self-adaption method for high-precision flow field analysis |
CN113283186A (en) * | 2021-04-21 | 2021-08-20 | 南京航空航天大学 | Universal grid self-adaption method for CFD |
CN114218875A (en) * | 2021-12-08 | 2022-03-22 | 南京航空航天大学 | Acceleration method and device for flow field prediction |
-
2022
- 2022-04-22 CN CN202210430204.3A patent/CN114880897A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7191161B1 (en) * | 2003-07-31 | 2007-03-13 | The United States Of America As Represented By The Administrator Of The National Aeronautics And Space Administration | Method for constructing composite response surfaces by combining neural networks with polynominal interpolation or estimation techniques |
CN110222828A (en) * | 2019-06-12 | 2019-09-10 | 西安交通大学 | A kind of Unsteady Flow method for quick predicting based on interacting depth neural network |
CN113221475A (en) * | 2021-04-02 | 2021-08-06 | 南京航空航天大学 | Grid self-adaption method for high-precision flow field analysis |
CN113283186A (en) * | 2021-04-21 | 2021-08-20 | 南京航空航天大学 | Universal grid self-adaption method for CFD |
CN114218875A (en) * | 2021-12-08 | 2022-03-22 | 南京航空航天大学 | Acceleration method and device for flow field prediction |
Non-Patent Citations (4)
Title |
---|
JUSTIN PHOMMACHANH: "Mesh Adaptation Using Machine Learning", KU SCHOLARWORKS, 31 December 2021 (2021-12-31), pages 1 - 53 * |
А.Г.ГОРШКОВ , 曾德顺: "板和壳同连续介质的非定常相互作用", 力学进展, no. 01, 25 February 1984 (1984-02-25), pages 80 - 88 * |
丁子元;安慰;刘学军;吕宏强: "针对高阶DG数值格式的非定常流场预测建模", 空气动力学学报, vol. 40, no. 006, 29 December 2021 (2021-12-29), pages 51 - 63 * |
曹伟;任梦柯;刘春太;阮诗伦;申长雨;: "注塑成型模拟理论与数值算法发展综述", 中国科学:技术科学, no. 06, 6 May 2020 (2020-05-06), pages 667 - 692 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
He et al. | Robust aerodynamic shape optimization—from a circle to an airfoil | |
Zhang et al. | Variable-fidelity expected improvement method for efficient global optimization of expensive functions | |
CN104951425B (en) | A kind of cloud service performance self-adapting type of action system of selection based on deep learning | |
Praveen et al. | Low cost PSO using metamodels and inexact pre-evaluation: Application to aerodynamic shape design | |
Iuliano et al. | Proper orthogonal decomposition, surrogate modelling and evolutionary optimization in aerodynamic design | |
Iuliano | Global optimization of benchmark aerodynamic cases using physics-based surrogate models | |
CN114218875A (en) | Acceleration method and device for flow field prediction | |
Zhang et al. | High-fidelity aerostructural optimization with integrated geometry parameterization and mesh movement | |
CA3157588A1 (en) | Methods and systems for the estimation of the computational cost of simulation | |
CN115357554B (en) | Graph neural network compression method and device, electronic equipment and storage medium | |
US20230062600A1 (en) | Adaptive design and optimization using physics-informed neural networks | |
CN113283186A (en) | Universal grid self-adaption method for CFD | |
CN116882708B (en) | Steel process flow control method and device based on digital twin and related equipment | |
CN113221475A (en) | Grid self-adaption method for high-precision flow field analysis | |
Durasov et al. | Debosh: Deep bayesian shape optimization | |
CN109540089B (en) | Bridge deck elevation fitting method based on Bayes-Kriging model | |
Demir et al. | Robust shape optimization under model uncertainty of an aircraft wing using proper orthogonal decomposition and inductive design exploration method | |
JP2020119189A (en) | Fluid analysis system, method for analyzing fluid, and fluid analysis program | |
CN112232565A (en) | Two-stage time sequence prediction method, prediction system, terminal and medium | |
CN114880897A (en) | Unsteady flow field grid adaptive analysis method based on machine learning | |
Tenne | An adaptive-topology ensemble algorithm for engineering optimization problems | |
JP4461245B2 (en) | Stock price fluctuation analysis system | |
CN114781207A (en) | Heat source layout temperature field prediction method based on uncertainty and semi-supervised learning | |
Rendall et al. | Multi-dimensional aircraft surface pressure interpolation using radial basis functions | |
US11995380B2 (en) | System and method for heat exchanger shape optimization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |