Object streaming simulation method

Through feature enhancement, fully connected neural network uses the distance and angle characteristics of constrained points to simulate the object flow around, solving the problems of slow convergence speed and high calculation cost in the existing technology, and achieving the effect of fast training and efficient calculation .

CN119150720APending Publication Date: 2024-12-17NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410971173.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing computational fluid mechanics methods are used in aircraft design to simulate objects around flows, such as grid dependence, difficulty in designing higher-order formats, and huge cost of solving inverse problems. The slow convergence speed of physical information neural network methods leads to training. The long time limits its application.

Method used

A fully connected neural network is adopted to train the distance characteristics and angle characteristics of the constrained points, and combine it with the flow conditions to build a total loss function, realizing object flow simulation, which improves convergence speed and reduces calculation costs.

Benefits of technology

It significantly improves the convergence speed of object flow simulation, shortens training time, reduces calculation costs, and does not require grid generation and reverse problems to be easily realized. It is suitable for the flow simulation of objects such as aviation vehicles and automobiles and high-speed rail.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150720A_ABST
    Figure CN119150720A_ABST
Patent Text Reader

Abstract

The invention discloses an object streaming simulation method. The method comprises the following steps: acquiring an incoming flow working condition, constructing a geometric shape of an object, and calculating an area; collecting constraint points in the calculation area and at the boundary of the calculation area; calculating distance features and angle features of the constraint points; constructing a distance feature full-connection neural network and an angle feature full-connection neural network, and training until convergence; respectively inputting the coordinates of the constraint points into the trained distance feature full-connection neural network and the trained angle feature full-connection neural network to obtain distance features and angle features in a function form; constructing a feature enhancement full-connection neural network for streaming simulation, and training to convergence; the coordinates, the distance features and the angle features of the constraint points are input into a feature enhancement full-connection neural network, the feature enhancement full-connection neural network outputs values corresponding to streaming flow field variables, and object streaming simulation is completed. According to the method, the convergence speed is high during object streaming simulation, and the calculation cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of fluid dynamics, and in particular to a method for simulating flow around an object. Background Art

[0002] In the field of aerospace, accurate simulation of flow around objects is crucial in all aspects of aircraft design. In the past few decades, computational fluid dynamics (CFD) methods have been the main means of simulating flow around objects, including finite difference method, finite volume method and finite element method. With the increasing demand for aircraft design, the limitations of CFD methods such as grid dependence, difficulty in high-order format design and huge cost of solving inverse problems have become increasingly prominent, restricting the efficient development of aircraft.

[0003] In 2019, researchers proposed a physics-informed neural network (PINNs) for solving the direct and inverse problems of partial differential equations. The core of this method is to encode partial differential equations into the loss function of the neural network through automatic differentiation, so that the network satisfies the equation constraints while approximating the boundary conditions or observation data. Compared with the CFD method, the PINNs method has the advantages of no need for grid generation, easy implementation of inverse problems, and batch solution. However, the PINNs method has the limitations of slow convergence speed, long training time and high training cost, which restricts the application of this method in the problem of simulating the flow around objects. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a method for simulating flow around an object, which has a fast convergence speed and reduces the calculation cost when simulating flow around an object.

[0005] In order to solve the above problems, the present invention adopts the following technical solutions:

[0006] A method for simulating flow around an object of the present invention comprises the following steps:

[0007] S1: Obtain the incoming flow conditions, construct the geometric shape of the object, and calculate the area;

[0008] S2: Collect constraint points within the calculation area and at the boundary of the calculation area;

[0009] S3: Determine the projection point of the constraint point on the surface of the object, take the distance between the constraint point and the corresponding projection point as the distance feature of the constraint point, and take the angle between the line connecting the constraint point and the corresponding projection point and the horizontal plane as the angle feature of the constraint point;

[0010] S4: A distance feature fully connected neural network is constructed with the coordinates of the constraint points as input and the distance features of the constraint points as output, and the training is performed until convergence; an angle feature fully connected neural network is constructed with the coordinates of the constraint points as input and the angle features of the constraint points as output, and the training is performed until convergence;

[0011] S5: input the coordinates of the constraint points into the trained distance feature fully connected neural network and the angle feature fully connected neural network respectively, and obtain the corresponding distance features in function form and angle features in function form;

[0012] S6: Taking the coordinates of the constraint points, the distance features in the form of functions, and the angle features in the form of functions as inputs, and the flow field variables as outputs, a feature-enhanced fully connected neural network for flow simulation is constructed. The total loss function is constructed in combination with the incoming flow conditions, and the feature-enhanced fully connected neural network is trained until convergence.

[0013] S7: The coordinates, distance features, and angle features of the constraint points are input into the trained feature-enhanced fully-connected neural network, and the feature-enhanced fully-connected neural network outputs the values ​​of the corresponding flow field variables to complete the flow simulation of the object.

[0014] In this scheme, the projection point of the constraint point on the surface of the object refers to the point on the surface of the object with the shortest distance to the constraint point. The coordinates, distance features, and angle features of the constraint point are used together as the input of the feature-enhanced fully connected neural network, which effectively improves the representation ability of the feature-enhanced fully connected neural network, thereby greatly improving the convergence speed of the object flow simulation. The convergence speed is 4-10 times faster than that of the PINNs method. Since the training time of the distance feature fully connected neural network and the angle feature fully connected neural network is only about 1 / 100 of the training time of the feature-enhanced fully connected neural network, it has little effect on the training time of this method, so the overall training time of this method is 1 / 2 of the training time of the PINNs method. Greatly reduces the computational cost.

[0015] Preferably, step S2 comprises the following steps: collecting constraint points within the calculation area, and recording the collected constraint points as residual constraint points; collecting constraint points at the boundary of the calculation area, and recording the collected constraint points as boundary constraint points.

[0016] Preferably, step S4 includes the following steps: constructing a distance feature fully connected neural network with the coordinates of the constraint point as input and the distance features of the constraint point as output, constructing a first loss function for training, training the distance feature fully connected neural network until convergence, and obtaining a trained distance feature fully connected neural network; constructing an angle feature fully connected neural network with the coordinates of the constraint point as input and the angle features of the constraint point as output, constructing a second loss function for training, training the angle feature fully connected neural network until convergence, and obtaining a trained angle feature fully connected neural network.

[0017] Preferably, the formula of the first loss function is:

[0018]

[0019] Among them, Loss 1 is the first loss function, N f is the total number of residual constraint points, is the coordinate of the residual constraint point with index i, is the distance feature of the residual constraint point with index i, The fully connected neural network for distance features is based on the input coordinates The output distance feature, Nb is the total number of boundary constraint points, are the coordinates of the boundary constraint point with index j, is the distance feature of the boundary constraint point with index j, The fully connected neural network for distance features is based on the input coordinates Output distance feature, 1≤i≤N f , 1≤j≤N b ;

[0020] The formula of the second loss function is:

[0021]

[0022] Among them, Loss 2 is the second loss function, is the angle feature of the residual constraint point with index i, The fully connected neural network for angle features is based on the input coordinates The output angle characteristics, is the angle feature of the boundary constraint point with index j, The fully connected neural network for angle features is based on the input coordinates Angular features of the output.

[0023] Preferably, step S6 comprises the following steps:

[0024] S61: Taking the coordinates of the constraint points, the distance features in the form of functions, and the angle features in the form of functions as inputs, and the flow field variables as outputs, a feature-enhanced fully connected neural network for flow simulation is constructed;

[0025] S62: Constructing the total loss function of the feature-enhanced fully connected neural network according to the incoming flow conditions;

[0026] S63: Train the feature-enhanced fully connected neural network to convergence with the goal of minimizing the total loss function.

[0027] Preferably, the step S62 comprises the following steps:

[0028] S621: constructing a flow control equation according to the incoming flow condition and obtaining boundary conditions from the incoming flow condition;

[0029] S622: using an automatic differentiation method to calculate differential terms of various orders in the flow control equation, and combining and calculating the equation residual of the flow control equation;

[0030] S623: Calculate the equation loss of the flow control equation on the residual constraint point data set composed of the residual constraint points, calculate the boundary loss according to the boundary conditions on the boundary constraint point data set composed of the boundary constraint points, and construct the total loss function of the feature enhanced fully connected neural network based on the equation loss and the boundary loss.

[0031] Preferably, the method of calculating the differential terms of each order in the flow control equation by using the automatic differentiation method in step S622 comprises the following steps:

[0032] The automatic differentiation method is used to calculate the partial derivatives of the distance characteristics of the constraint point with respect to the coordinates, the partial derivatives of the angle characteristics of the constraint point with respect to the coordinates, and the partial derivatives of the flow field variables around the constraint point with respect to the coordinates, the partial derivatives of the distance characteristics, and the partial derivatives of the angle characteristics. The differential terms of each order in the flow control equation are calculated according to the chain rule.

[0033] Preferably, the formula of the total loss function is as follows:

[0034] Loss = λ f Loss f +λ b Loss b ,

[0035] Among them, Loss is the total loss function, Loss f is the equation loss, Loss b is the boundary loss, λ f is the weight of the loss equation, λ b is the weight of the boundary loss.

[0036] Preferably, the equation loss formula is:

[0037]

[0038] The formula for the boundary loss is:

[0039]

[0040] Among them, Lossf is the equation loss, Lossb is the boundary loss, To change the coordinates to The coordinates of the residual constraint points, the distance features in the form of functions, the angle features in the form of functions, the flow field variables output by the network after the input features are enhanced with the fully connected neural network, To change the coordinates to The coordinates of the boundary constraint points, the distance features in the form of functions, and the angle features in the form of functions are input into the feature-enhanced fully connected neural network, and the network outputs the flow field variables. R[·] is the equation residual operator, and B[·] is the boundary condition operator.

[0041] Preferably, the angle range of the angle feature is 0-π / 2.

[0042] The beneficial effects of the present invention are as follows: the present method has the advantages of no need for grid generation, easy implementation of inverse problems, and batch solution, just like the PINNs method; and the present method converges faster than the PINNs method, significantly shortens the training time, and reduces the computational cost, and can be used for flow simulation of objects such as aircraft, automobiles, high-speed railways, and marine vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a flow chart of an embodiment;

[0044] Figure 2 It is a schematic diagram of the calculation area of ​​the flow around a two-dimensional NACA0012 airfoil;

[0045] Figure 3 It is a comparison diagram of boundary loss convergence curves when the embodiment method and the PINNs method are used to simulate the flow around a two-dimensional NACA0012 airfoil;

[0046] Figure 4 It is a comparison diagram of the equation loss convergence curves when the embodiment method and the PINNs method are used to simulate the flow around a two-dimensional NACA0012 airfoil. DETAILED DESCRIPTION

[0047] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings.

[0048] Embodiment: A method for simulating flow around an object in this embodiment is as follows: Figure 1 As shown, the following steps are included:

[0049] S1: Obtain the incoming flow conditions, construct the geometric shape of the object, and calculate the area;

[0050] S2: Collect constraint points in the calculation area and record the collected constraint points as residual constraint points; collect constraint points at the boundary of the calculation area and record the collected constraint points as boundary constraint points;

[0051] S3: Determine the projection point of the constraint point on the surface of the object, take the distance between the constraint point and the corresponding projection point as the distance feature of the constraint point, take the angle between the line connecting the constraint point and the corresponding projection point and the horizontal plane as the angle feature of the constraint point, and the angle range of the angle feature is 0-π / 2;

[0052] S4: Using the coordinates of the constraint points as input and the distance features of the constraint points as output, a distance feature fully connected neural network is constructed and trained to convergence; using the coordinates of the constraint points as input and the angle features of the constraint points as output, an angle feature fully connected neural network is constructed and trained to convergence;

[0053] S5: input the coordinates of the constraint points into the trained distance feature fully connected neural network and the angle feature fully connected neural network respectively, and obtain the corresponding distance features in function form and angle features in function form;

[0054] S6: Taking the coordinates of the constraint points, the distance features in the form of functions, and the angle features in the form of functions as inputs, and the flow field variables as outputs, a feature-enhanced fully connected neural network for flow simulation is constructed. The total loss function is constructed in combination with the incoming flow conditions, and the feature-enhanced fully connected neural network is trained until convergence.

[0055] S7: The coordinates, distance features, and angle features of the constraint points are input into the trained feature-enhanced fully-connected neural network, and the feature-enhanced fully-connected neural network outputs the values ​​of the corresponding flow field variables to complete the flow simulation of the object.

[0056] Step S4 includes the following steps: constructing a distance feature fully connected neural network with the coordinates of the constraint point as input and the distance features of the constraint point as output, and constructing a first loss function for training, training the distance feature fully connected neural network until convergence, and obtaining a trained distance feature fully connected neural network; constructing an angle feature fully connected neural network with the coordinates of the constraint point as input and the angle features of the constraint point as output, and constructing a second loss function for training, training the angle feature fully connected neural network until convergence, and obtaining a trained angle feature fully connected neural network.

[0057] The formula of the first loss function is:

[0058]

[0059] Among them, Loss 1 is the first loss function, N f is the total number of residual constraint points, is the coordinate of the residual constraint point with index i, is the distance feature of the residual constraint point with index i, The fully connected neural network for distance features is based on the input coordinates The output distance feature, Nb is the total number of boundary constraint points, are the coordinates of the boundary constraint point with index j, is the distance feature of the boundary constraint point with index j, The fully connected neural network for distance features is based on the input coordinates Output distance feature, 1≤i≤N f , 1≤j≤N b ;

[0060] The formula for the second loss function is:

[0061]

[0062] Among them, Loss 2 is the second loss function, is the angle feature of the residual constraint point with index i, The fully connected neural network for angle features is based on the input coordinates The output angle characteristics, is the angle feature of the boundary constraint point with index j, The fully connected neural network for angle features is based on the input coordinates Angular features of the output.

[0063] Step S6 includes the following steps:

[0064] S61: Taking the coordinates of the constraint points, the distance features in the form of functions, and the angle features in the form of functions as inputs, and the flow field variables as outputs, a feature-enhanced fully connected neural network for flow simulation is constructed;

[0065] S62: Constructing the total loss function of the feature-enhanced fully connected neural network according to the incoming flow conditions;

[0066] S63: Using an optimization algorithm (e.g., L-BFGS optimization algorithm), with the goal of minimizing the total loss function, train the feature-enhanced fully connected neural network until convergence and find the optimal network parameters.

[0067] Step S62 includes the following steps:

[0068] S621: constructing a flow control equation according to the incoming flow condition and obtaining boundary conditions from the incoming flow condition;

[0069] S622: using an automatic differentiation method to calculate differential terms of various orders in the flow control equation, and combining and calculating the equation residual of the flow control equation;

[0070] S623: Calculate the equation loss of the flow control equation on the residual constraint point data set composed of the residual constraint points, calculate the boundary loss according to the boundary conditions on the boundary constraint point data set composed of the boundary constraint points, and construct the total loss function of the feature enhanced fully connected neural network based on the equation loss and the boundary loss.

[0071] The formula for the equation loss is:

[0072]

[0073] The formula for boundary loss is:

[0074]

[0075] The formula of the total loss function is as follows:

[0076] Loss = λ f Loss f +λ b Loss b ,

[0077] Among them, Loss is the total loss function, Loss f is the equation loss, Loss b is the boundary loss, To change the coordinates to The coordinates of the residual constraint points, the distance features in the form of functions, the angle features in the form of functions, the flow field variables output by the network after the input features are enhanced with the fully connected neural network, To change the coordinates to The coordinates of the boundary constraint points, the distance features in the form of functions, and the angle features in the form of functions are input into the feature-enhanced fully connected neural network. The network outputs the flow field variables. R[·] is the residual operator of the equation. B[·] represents the boundary condition operator (including velocity inlet conditions, pressure outlet conditions, and wall no-slip conditions). λ f is the weight of the loss equation, λ b is the weight of the boundary loss, λ f , b Used to maintain the balance of the two losses during optimization, they are set before training.

[0078] The method of using the automatic differentiation method in step S622 to calculate the differential terms of each order in the flow control equation includes the following steps:

[0079] The automatic differentiation method is used to calculate the partial derivatives of the distance characteristics of the constraint point with respect to the coordinates, the partial derivatives of the angle characteristics of the constraint point with respect to the coordinates, the partial derivatives of the flow field variables around the constraint point with respect to the coordinates, the partial derivatives of the flow field variables around the constraint point with respect to the distance characteristics, and the partial derivatives of the flow field variables around the constraint point with respect to the angle characteristics, and the differential terms of each order in the flow control equation are calculated according to the chain rule.

[0080] Through steps S5 and S6, we can know the distance characteristics of the constraint point as a function of the coordinates, the angle characteristics of the constraint point as a function of the coordinates, the flow field variables of the constraint point as a function of the coordinates, the flow field variables of the constraint point as a function of the distance characteristics, and the flow field variables of the constraint point as a function of the angle characteristics, so the automatic differentiation method can be used to calculate the corresponding partial derivatives.

[0081] In this scheme, the projection point of the constraint point on the surface of the object refers to the point on the surface of the object with the shortest distance to the constraint point. The constraint point and the corresponding projection point are connected by a straight line. The length of the straight line is the constraint point distance feature, and the angle between the straight line and the horizontal plane is the constraint point angle feature. The angle range is 0-ππ / 2. The flow field variables include the velocity component of the fluid in the x direction, the velocity component in the y direction, the velocity component in the z direction, and the pressure at the constraint point.

[0082] In step S5, the trained distance feature fully connected neural network and angle feature fully connected neural network output a function of the constraint point coordinates according to the input constraint point coordinates. For example, the constraint point coordinates are (x, y, z), and the trained distance feature fully connected neural network and angle feature fully connected neural network are input. The distance feature fully connected neural network outputs the constraint point distance feature in the form of a function. Angle feature of the constraint point in the form of an output function of the fully connected neural network

[0083] This method designs the distance features and angle features of the constraint points, and uses the coordinates, distance features, and angle features of the constraint points as the input of the feature-enhanced fully connected neural network, which effectively improves the representation ability of the feature-enhanced fully connected neural network, thereby greatly improving the convergence speed of the object flow simulation. The convergence speed is 4-10 times faster than that of the PINNs method. Since the training time of the distance feature fully connected neural network and the angle feature fully connected neural network is only about 1 / 100 of the training time of the feature-enhanced fully connected neural network, it has little effect on the training time of this method, so the overall training time of this method is only 1 / 2 of the training time of the PINNs method. The computational cost is greatly reduced. At the same time, this method has the same advantages as the PINNs method, such as no need for grid generation, easy implementation of inverse problems, and batch solution. This method can be used for flow simulation of objects such as aircraft, automobiles, high-speed railways, and marine vehicles.

[0084] For example:

[0085] The object is a two-dimensional NACA0012 airfoil, and the incoming flow conditions are as follows: the Reynolds number is 400, the boundary conditions are velocity inlet and pressure outlet, the inlet velocity is 1, the outlet pressure is 0, and the airfoil wall satisfies the no-slip condition.

[0086] The method for simulating the flow around a two-dimensional NACA0012 airfoil is as follows:

[0087] Obtain the incoming flow conditions, construct the geometric shape and calculation area of ​​the two-dimensional NACA0012 airfoil, and the calculation area is as follows: Figure 2 As shown, since the geometric shape of the two-dimensional NACA0012 airfoil is two-dimensional, the coordinates only have x-axis and y-axis, but no z-axis.

[0088] Constraint points are collected within the calculation area and recorded as residual constraint points; constraint points are collected at the boundary of the calculation area and recorded as boundary constraint points.

[0089] Determine the projection point of the constraint point on the two-dimensional NACA0012 airfoil surface, take the distance between the constraint point and the corresponding projection point as the distance feature of the constraint point, and take the angle between the line connecting the constraint point and the corresponding projection point and the horizontal plane as the angle feature of the constraint point. Since the two-dimensional NACA0012 airfoil is two-dimensional, the horizontal plane and the two-dimensional NACA0012 airfoil are perpendicular to each other.

[0090] A distance feature fully connected neural network is constructed with the coordinates of the constraint points as input and the distance features of the constraint points as output, and a first loss function for training is constructed. The distance feature fully connected neural network is trained until convergence to obtain a trained distance feature fully connected neural network; an angle feature fully connected neural network is constructed with the coordinates of the constraint points as input and the angle features of the constraint points as output, and a second loss function for training is constructed. The angle feature fully connected neural network is trained until convergence to obtain a trained angle feature fully connected neural network.

[0091] The formula of the first loss function is:

[0092]

[0093] Among them, Loss 1 is the first loss function, N f is the total number of residual constraint points, is the coordinate of the residual constraint point with index i, is the distance feature of the residual constraint point with index i, The fully connected neural network for distance features is based on the input coordinates Output distance feature, N b is the total number of boundary constraint points, are the coordinates of the boundary constraint point with index j, is the distance feature of the boundary constraint point with index j, The fully connected neural network for distance features is based on the input coordinates Output distance feature, 1≤i≤N f , 1≤j≤N b ;

[0094] The formula for the second loss function is:

[0095]

[0096] Among them, Loss 2 is the second loss function, is the angle feature of the residual constraint point with index i, The fully connected neural network for angle features is based on the input coordinates The output angle characteristics, is the angle feature of the boundary constraint point with index j, The fully connected neural network for angle features is based on the input coordinates Angular features of the output.

[0097] The coordinates of the constraint points are respectively input into the trained distance feature fully connected neural network and angle feature fully connected neural network to obtain the corresponding distance features in function form and angle features in function form.

[0098] A feature-enhanced fully-connected neural network is constructed with the coordinates of the constraint points, the distance features in the form of functions, and the angle features in the form of functions as inputs and the flow field variables as outputs for flow simulation.

[0099] The flow control equation is constructed according to the incoming flow conditions. The flow control equation is as follows:

[0100]

[0101] Among them, x, y are the spatial coordinates of the constraint point, u is the velocity component of the fluid in the x direction, v is the velocity component of the fluid in the y direction, p is the pressure, and Re is the Reynolds number.

[0102] The automatic differentiation method is used to calculate the partial derivative of the distance feature of the constraint point with respect to the coordinates. The partial derivative of the angular characteristic of the constraint point with respect to the coordinates, The partial derivatives of the flow field variables around the constraint point with respect to the coordinates, The partial derivative of the flow field variables around the constraint point with respect to the distance characteristic, The partial derivatives of the flow field variables around the constraint point with respect to the angle characteristics, Among them, D is the distance feature of the constraint point, and θ is the angle feature of the constraint point.

[0103] According to the chain rule, the differential terms of each order in the flow control equation are calculated:

[0104]

[0105]

[0106] The residuals R1, R2, and R3 of the flow control equation are calculated in combination, and the formula is as follows:

[0107]

[0108] The equation loss of the flow control equation is calculated on the residual constraint point data set composed of the residual constraint points, the boundary conditions are obtained from the incoming flow conditions, and the boundary loss is calculated according to the boundary conditions on the boundary constraint point data set composed of the boundary constraint points. The total loss function of the fully connected neural network of the flow field is constructed according to the equation loss and the boundary loss.

[0109] The formula for the equation loss is as follows:

[0110]

[0111] The formula for boundary loss is as follows:

[0112]

[0113] The formula of the total loss function is as follows:

[0114] Loss = λ f Loss f +λ b Loss b ,

[0115] Among them, Loss is the total loss function, Loss f is the equation loss, Loss b is the boundary loss, To change the coordinates to The coordinates of the residual constraint points, the distance features in the form of functions, the angle features in the form of functions, the flow field variables output by the network after the input features are enhanced with the fully connected neural network, To change the coordinates to The coordinates of the boundary constraint points, the distance features in the form of functions, and the angle features in the form of functions are input into the feature-enhanced fully connected neural network. The network outputs the flow field variables. B[·] represents the boundary condition operator (including velocity inlet conditions, pressure outlet conditions, and wall no-slip conditions). λ f is the weight of the loss equation, λ b is the weight of the boundary loss. For this example, take λ f =1,λ b =4.

[0116] The L-BFGS optimization algorithm is used to minimize the total loss function, train the feature-enhanced fully connected neural network until convergence, and find the optimal network parameters.

[0117] The coordinates, distance features, and angle features of the constraint points are input into the trained feature-enhanced fully-connected neural network, and the feature-enhanced fully-connected neural network outputs the values ​​of the corresponding flow field variables to complete the flow simulation of the object.

[0118] The method of this embodiment and the PINNs method with the same network size are used to simulate the flow around the two-dimensional NACA0012 airfoil. The comparison of the boundary loss convergence curves of the two methods when simulating the flow around the object is shown in the figure. Figure 3 As shown, Figure 3 The horizontal axis in is the training steps of the neural network, the vertical axis is the boundary loss, the PINNs curve is the boundary loss convergence curve of the PINNs method, and the Our method curve is the boundary loss convergence curve of the method of this embodiment; the comparison diagram of the equation loss convergence curves of the two methods when simulating the flow around the object is shown in FIG. Figure 4 As shown, Figure 4 The horizontal axis in is the number of training steps of the neural network, the vertical axis is the equation loss, the PINNs curve is the equation loss convergence curve of the PINNs method, and the Our method curve is the equation loss convergence curve of the method of this embodiment.

[0119] from Figure 3 , Figure 4 It can be seen that the method of this embodiment improves the convergence speed of the flow simulation by about 10 times. Since the training time of the distance feature fully connected neural network and the angle feature fully connected neural network is only about 1 / 100 of the training time of the feature enhancement fully connected neural network, the training time of this method is very small, so the overall training time of this method is 1 / 2 of the training time of the PINNs method. This greatly reduces the computational cost.

Claims

1. A method for simulating flow around an object, characterized in that: The following steps are involved: S1: Obtain the incoming flow conditions, construct the geometric shape of the object, and calculate the area; S2: Collect constraint points within the calculation area and at the boundary of the calculation area; S3: Determine the projection point of the constraint point on the surface of the object, take the distance between the constraint point and the corresponding projection point as the distance feature of the constraint point, and take the angle between the line connecting the constraint point and the corresponding projection point and the horizontal plane as the angle feature of the constraint point; S4: Using the coordinates of the constraint points as input and the distance features of the constraint points as output, a distance feature fully connected neural network is constructed and trained to convergence; using the coordinates of the constraint points as input and the angle features of the constraint points as output, an angle feature fully connected neural network is constructed and trained to convergence; S5: input the coordinates of the constraint points into the trained distance feature fully connected neural network and the angle feature fully connected neural network respectively, and obtain the corresponding distance features in function form and angle features in function form; S6: Taking the coordinates of the constraint points, the distance features in the form of functions, and the angle features in the form of functions as inputs, and the flow field variables as outputs, a feature-enhanced fully connected neural network for flow simulation is constructed. The total loss function is constructed in combination with the incoming flow conditions, and the feature-enhanced fully connected neural network is trained until convergence. S7: The coordinates, distance features, and angle features of the constraint points are input into the trained feature-enhanced fully-connected neural network, and the feature-enhanced fully-connected neural network outputs the values ​​of the corresponding flow field variables to complete the flow simulation of the object.

2. The method for simulating flow around an object according to claim 1, characterized in that: The step S2 comprises the following steps: collecting constraint points in the calculation area and recording the collected constraint points as residual constraint points; collecting constraint points at the boundary of the calculation area and recording the collected constraint points as boundary constraint points.

3. The method for simulating flow around an object according to claim 2, characterized in that: The step S4 includes the following steps: constructing a distance feature fully connected neural network with the coordinates of the constraint point as input and the distance features of the constraint point as output, constructing a first loss function for training, training the distance feature fully connected neural network until convergence, and obtaining a trained distance feature fully connected neural network; constructing an angle feature fully connected neural network with the coordinates of the constraint point as input and the angle features of the constraint point as output, constructing a second loss function for training, training the angle feature fully connected neural network until convergence, and obtaining a trained angle feature fully connected neural network.

4. A method for simulating flow around an object according to claim 3, characterized in that: The formula of the first loss function is: Among them, Loss1 is the first loss function, N f is the total number of residual constraint points, is the coordinate of the residual constraint point with index i, is the distance feature of the residual constraint point with index i, The fully connected neural network for distance features is based on the input coordinates Output distance feature, N b is the total number of boundary constraint points, are the coordinates of the boundary constraint point with index j, is the distance feature of the boundary constraint point with index j, The fully connected neural network for distance features is based on the input coordinates Output distance feature, 1≤i≤N f , 1≤j≤N b ; The formula of the second loss function is: Among them, Loss2 is the second loss function, is the angle feature of the residual constraint point with index i, The fully connected neural network for angle features is based on the input coordinates The output angle characteristics, is the angle feature of the boundary constraint point with index j, The fully connected neural network for angle features is based on the input coordinates Angular features of the output.

5. The method for simulating flow around an object according to claim 2, characterized in that: The step S6 comprises the following steps: S61: Taking the coordinates of the constraint points, the distance features in the form of functions, and the angle features in the form of functions as inputs, and the flow field variables as outputs, a feature-enhanced fully connected neural network for flow simulation is constructed; S62: Constructing the total loss function of the feature-enhanced fully connected neural network according to the incoming flow conditions; S63: Train the feature-enhanced fully connected neural network to convergence with the goal of minimizing the total loss function.

6. A method for simulating flow around an object according to claim 5, characterized in that: The step S62 comprises the following steps: S621: constructing a flow control equation according to the incoming flow condition and obtaining boundary conditions from the incoming flow condition; S622: using an automatic differentiation method to calculate differential terms of various orders in the flow control equation, and combining and calculating the equation residual of the flow control equation; S623: Calculate the equation loss of the flow control equation on the residual constraint point data set composed of the residual constraint points, calculate the boundary loss according to the boundary conditions on the boundary constraint point data set composed of the boundary constraint points, and construct the total loss function of the feature enhanced fully connected neural network based on the equation loss and the boundary loss.

7. A method for simulating flow around an object according to claim 6, characterized in that: The method of using the automatic differentiation method in step S622 to calculate the differential terms of each order in the flow control equation includes the following steps: The automatic differentiation method is used to calculate the partial derivatives of the distance characteristics of the constraint point with respect to the coordinates, the partial derivatives of the angle characteristics of the constraint point with respect to the coordinates, and the partial derivatives of the flow field variables around the constraint point with respect to the coordinates, the partial derivatives of the distance characteristics, and the partial derivatives of the angle characteristics. The differential terms of each order in the flow control equation are calculated according to the chain rule.

8. The method for simulating flow around an object according to claim 6, characterized in that: The formula of the total loss function is as follows: Loss=λ f Loss f +λ b Loss b , Among them, Loss is the total loss function, Loss f is the equation loss, Loss b is the boundary loss, λ f is the weight of the loss equation, λ b is the weight of the boundary loss.

9. The method for simulating flow around an object according to claim 6, characterized in that: The equation loss formula is: The formula for the boundary loss is: Among them, Lossf is the equation loss, Lossb is the boundary loss, To change the coordinates to The coordinates of the residual constraint points, the distance features in the form of functions, the angle features in the form of functions, the flow field variables output by the network after the input features are enhanced with the fully connected neural network, To change the coordinates to The coordinates of the boundary constraint points, the distance features in the form of functions, and the angle features in the form of functions are input into the feature-enhanced fully connected neural network, and the network outputs the flow field variables. R[·] is the equation residual operator, and B[·] is the boundary condition operator.

10. The method for simulating flow around an object according to claim 1, characterized in that: The angle range of the angle feature is 0-π / 2.

Citation Information

Cited By

  • Depth coordinate transformation network enhanced partial differential equation neural network solving method

    CN120806029A

  • Deep coordinate transformation network enhanced partial differential equation neural network solving method

    CN120806029B