A correction method for temporal difference fluid simulation process based on graph convolutional network
By adopting a correction method based on graph convolution network in time-differential fluid simulation, the problems of error propagation and accumulation are solved, and the accuracy and efficiency of simulation are improved.
Patent Information
- Application Number
- CN202210318277.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-03-29
AI Technical Summary
The existing time-differential fluid simulation methods have error propagation phenomena, and simulation errors are prone to accumulate after multi-step simulation, resulting in simulation distortion and failure.
The correction method of the time-differential fluid simulation process based on graph convolution network is adopted, and the simulation results are corrected to reduce error accumulation through steps such as standardization, encoding, graph convolution calculation, error stripping and fusion encoding.
The errors in time-differential fluid simulation are effectively corrected, the accuracy and stability of the simulation are improved, the calculation time is reduced, and the calculation efficiency is improved.
Smart Images

Figure CN114722706B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning, and more specifically, to a correction method for a time-differential fluid simulation process based on a graph convolutional network. Background Art
[0002] Simulation technology is one of the core technologies in the manufacturing process of equipment and devices under the wave of contemporary digitalization and informatization. It calculates and simulates the physical evolution process and results of equipment and devices in digital space, and is an important tool for the research and development of equipment and devices. Fluid simulation plays a very important role in the research and development of surface and underwater equipment and devices. Most existing fluid simulators calculate the state of fluid at different times by solving complex partial differential equations (continuity equation, momentum equation or energy equation); in order to reduce the complexity of computational time and resource dependence, some time difference methods have been developed to solve the next simulation state through the previous simulation state and the simplified equation. With the development of deep learning, fluid simulation has developed a neural network for fitting fluid equations under the constraints of physical equations with the help of deep learning tools; in order to improve the generalization ability of neural networks at different times, most of these methods also use methods based on time difference, so that the network input does not depend on the time variable. Although the time difference method is currently widely used, it depends on the results of the previous simulation, and there is an error propagation phenomenon. The simulation error is easy to accumulate after multiple simulation steps, resulting in simulation distortion and failure. Summary of the invention
[0003] In order to alleviate the above problems, the present invention proposes a correction method for the time-differential fluid simulation process based on a graph convolutional network.
[0004] To solve the above problems, the technical solution proposed in the present invention is: a correction method for the time-difference fluid simulation process based on a graph convolutional network. First, the time-difference fluid simulator outputs the i-th step reasoning result, which is represented by the matrix A i ; Secondly, the matrix A i Input into the standardization module for data standardization, then encode with the encoder, then use graph convolution to calculate the first-order correction encoding result, strip out the first-order encoding error, then use graph convolution to calculate the second-order correction encoding result and strip out the second-order encoding error, then fuse the first-order encoding error and the second-order encoding error, then decode the fused encoding error to generate a true standardized simulation error Calculate the standardized simulation results and de-standardize them to get the corrected simulation results
[0005] Furthermore, the matrix A i ∈R n×d, where n represents the number of grids, that is, the number of nodes in the graph, and d represents the dimension of the simulation problem. For two-dimensional plane problems, let d = 3, which represents the velocity and pressure values in the x and y directions; for three-dimensional problems, let d = 4, which represents the velocity and pressure values in the x, y and z directions.
[0006] Furthermore, the matrix A i Use the mean and standard deviation of the training data accumulated during the training process to standardize. Specifically, let the accumulated mean be The standard deviation is The standardized representation is:
[0007]
[0008] It is a broadcast calculation mechanism.
[0009] Furthermore, the normalized value is passed to the encoder for encoding. The encoder is a single-layer fully connected network with a bias term. The input and output size of the network is [d, 512], and the encoder output is expressed as:
[0010]
[0011] Where W 0 ∈R d×512 , are the parameters learned by the network.
[0012] Furthermore, the output of the previous network is passed into the graph convolutional network to extract the first-order correction encoding result. The process is expressed as follows:
[0013]
[0014] in It represents the adjacency matrix of the self-connected nodes enhanced by adding the same-size unit matrix. The adjacency relationship is defined by the grid used by the time difference simulator, which is a two-way adjacency. Representation Matrix The degree matrix of is a diagonal matrix; W 1 represents the projection matrix, whose dimension is [512×512]; thus, the first-order coding error stripped out is expressed as:
[0015] L 1 =H 1 -H 2 ,L 1 ∈R n×512
[0016] Furthermore, the network output of the previous step is passed to the next graph convolution to remove the second-order correction encoding result. The process is expressed as follows:
[0017]
[0018] in Consistent with the previous step, it means that the adjacency matrix of the self-connected nodes is enhanced by adding the identity matrix of the same size; Representation Matrix The degree matrix of is a diagonal matrix; W 2 represents the projection matrix, whose dimension is [512×512]; thus, the stripped second-order coding error is expressed as:
[0019] L 2 =H 1 -H 3 ,L 2 ∈R n×51 2
[0020] Furthermore, the first-order and second-order errors obtained in the above steps are subjected to fusion coding transformation, the two errors are integrated, and nonlinear transformation is performed to filter the coding error. This is achieved through a single-layer fully connected network, expressed as:
[0021]
[0022] Among them, W 3 ∈R 512×1024 , is a learnable parameter and σ is an activation function.
[0023] Furthermore, the above coding error is further decoded to obtain The process is a single-layer fully connected network, which can be expressed as:
[0024]
[0025] Furthermore, the error of the previous step is Stripping, get the corrected standardized result It can be expressed as:
[0026]
[0027] Furthermore, the corrected results are de-normalized to obtain the final corrected simulation results. It can be expressed as:
[0028]
[0029] Furthermore, the training process of the above parameters includes the following steps:
[0030] S1. Construct a sample set of M training samples in This is a more accurate result obtained by the non-time-difference simulation method.
[0031] S2. Input the current simulation result matrix A of the time difference simulator i , the correction result is obtained through the above steps And the error of stripping
[0032] S3. Define the corrected data loss L data for:
[0033]
[0034] in, It represents the correct result of the simulation in the i-th step, which is the supervision data and is given directly in the training data.
[0035] S4. Define the data manifold regularization loss L mani for:
[0036]
[0037] where tr represents the trace of the matrix, Represents the symmetric normalized Laplacian matrix of the graph.
[0038] S5. Define the noise regularization loss L noise for:
[0039]
[0040] S6. Define the training loss as the combination of data loss, manifold regularization loss and noise regularization loss. The training loss loss is expressed as:
[0041] loss = L data +αL mani +βL noise
[0042] Among them, α and β are hyperparameters, balancing the impact of loss.
[0043] S7. Use back-propagation to calculate the parameter gradients and use the Adam optimization algorithm to update the parameters.
[0044] S8. Repeat the training process using the samples in S for iterative training.
[0045] Compared with the prior art, the advantages of this method are:
[0046] (1) This method generates correction results based on a graph convolutional neural network. This method relies on the adjacency relationship of the grid computing nodes used in the time difference simulation method and can be efficiently plugged into the time difference method. At the same time, thanks to the natural data smoothing ability of the graph convolutional neural network, the error can be effectively corrected.
[0047] (2) This method only relies on a small number of graph convolutional networks and fully connected networks, and uses a large number of matrix and vector operations in calculations. Graphics computing cards can be used to accelerate calculations. The correction process takes less time and has high computational efficiency. It has good deployment and application capabilities in engineering. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The flowchart of the correction method based on graph convolution is shown, which describes the specific process of the correction method.
[0049] Figure 2 It represents the process of implementing the correction of the simulation process of the time difference simulator based on the method of this patent.
[0050] Specific implementation method
[0051] The accompanying drawings are only for illustrative purposes and should not be construed as limiting the present invention. In order to better illustrate the present embodiment, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent actual methods. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings. The positional relationships described in the accompanying drawings are only for illustrative purposes and should not be construed as limiting the present invention.
[0052] Implementation Example 1:
[0053] like Figure 1 , 2 As shown in FIG. 1 , in the method for implementing the inference process of the GCN-based modified time-difference fluid simulator, the process can be divided into three parts:
[0054] 1) Collection and processing of training data;
[0055] Step 1: Set the simulation scene parameters, including simulation dimension, entry speed, space boundary, obstacle model, fluid viscosity, fluid density, etc.
[0056] Step 2, using a non-time-difference simulation method to solve the multi-step accurate simulation results of the fluid based on the simulation parameters; the data includes simulation grid coordinates, connection relationships of grid points, types of grid points (such as inflow points, outflow points, obstacle points, boundary points, etc.), and velocity and pressure values on the grid points, and the above data are used as target data for the correction method;
[0057] Step 3, given the simulation grid point coordinates, grid point type, inflow field conditions and boundary conditions, use the time difference fluid simulator to simulate, and simulate multi-step results as input data for the correction method;
[0058] 2) Training of parameters in the correction method;
[0059] Step 1: uniformly and without replacement, randomly sample the input data and target data pairs at the same simulation time as samples, and use the input data of the sampled samples as network input;
[0060] Step 2, inputting the input data of the sample obtained by sampling into the correction method to obtain a corrected sample;
[0061] Step 3: Calculate the data loss, manifold regularization loss, and noise regularization loss by combining the corrected output and target data, and calculate the final loss by weighted summation;
[0062] Step 4: Back propagate the loss and calculate the gradient of each parameter;
[0063] Step 5: Use an optimization algorithm, such as Adam, to update the parameters.
[0064] Step 6, repeat the above steps and continue sampling until the preset number of training times is reached;
[0065] 3) Perform multi-step simulation based on the correction method;
[0066] Step 1, input the simulation result of the current step of the time difference simulator to obtain the preliminary simulation result of the next step;
[0067] Step 2, input the preliminary simulation results into the correction method for correction, and obtain the correction results as the simulation results of the next step;
[0068] Step 3, update the simulation result entry flow state as the input of the next time difference simulator;
[0069] Step 4, repeat step 1 until the specified number of simulation time steps is reached;
[0070] Obviously, the above-mentioned embodiments of the present invention are merely examples for clearly explaining the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A correction method for a time-differential fluid simulation process based on a graph convolutional network, characterized in that: First, the time difference simulator outputs the next simulation result; secondly, the simulation result is input into the standardization module for data standardization, and then encoded by the encoder, and then the first-order correction coding result is calculated by graph convolution, and the first-order coding error is stripped out. Then, the second-order correction coding result is calculated by graph convolution and the second-order coding error is stripped out. Then, the first-order coding error and the second-order coding error are fused and encoded, and then the fused coding error is decoded to generate a true standardized simulation error, the standardized simulation result is deduced, and the corrected simulation result is obtained after de-standardization.
2. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 1, characterized in that: The method is to correct the next step of reasoning results output by the time difference fluid simulator, and the correction method is based on a graph convolutional network.
3. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 1, characterized in that: The correction process includes standardization, encoding, first-order correction and error stripping, second-order correction and error stripping, fusion encoding, decoding, and de-standardization steps.
4. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 3, characterized in that: The standardization process relies on the calculation of the accumulated mean and standard deviation. The encoder is a fully connected network related to the dimension of the simulation problem. The first-order and second-order correction peeling process adopts a method based on graph convolutional neural network. The fusion coding uses a fully connected network encoding after the numerical fusion of the first-order and second-order peeling errors. The decoding is based on the fully connected network. The de-standardization process relies on the calculation of the accumulated mean and standard deviation.
5. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 4, characterized in that: The standardization process is expressed as: Among them, A i represents the output of the graph neural network fluid dynamics simulator, represents the cumulative mean, Represents the cumulative standard deviation.
6. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 4, characterized in that: The encoder is represented as: in , is the parameter of network learning, and d represents the problem dimension.
7. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 4, characterized in that: The first-order and second-order modified graph convolutions are expressed as: Where k represents the order, represents the learnable parameters of the current order, and the corresponding noise stripping method is expressed as:
8. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 4, characterized in that: The fusion code is expressed as:
9. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 4, characterized in that: The decoding process is expressed as:
10. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 4, characterized in that: The denormalization process can be expressed as:
11. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 3, characterized in that: The training loss is obtained by weighted summation of data loss, manifold regularization loss, and noise regularization loss, where: The data loss is expressed as: The manifold regularization loss is expressed as: The noise regularization loss is expressed as: in Indicates the result of the correction. Represents the real result, represents the symmetric normalized Laplacian matrix, Represents the error after decoding, and n represents the number of simulation grid nodes, that is, the number of graph nodes.
12. A correction method for a time-differential fluid simulation process based on a graph convolutional network according to claim 11, characterized in that: The training loss is defined as the weighted sum of the three losses described in claim 11, expressed as in, is a hyperparameter.
Citation Information
Patent Citations
Fluid animation parameter estimation and detail enhancement method based on data driving
CN112381914A
Thermal error prediction model based on ONT-GCN space-time model, modeling method and haze-edge-fog-cloud error compensation system
CN114237154A