Motion boundary pressure field reconstruction method, system, equipment and medium
Through the dual neural network model combining boundary network and flow field network, the problem that traditional methods are difficult to accurately calculate the surface dynamic boundary pressure field is solved, and high-precision pressure field solution is achieved in any boundary motion form.
Patent Information
- Application Number
- CN202411826864.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Traditional pressure reconstruction methods are difficult to accurately calculate the pressure field of the surface dynamic boundary, mainly due to the large experimental measurement error, the limited analytical ability of PIV technology near the wall surface, and the need for complex boundary processing technology at the motion boundary.
The dynamic boundary pressure field reconstruction method based on the bi-neural network is adopted to track the Lagrangian boundary points through the boundary network, and the flow field network approximates the solution of the flow field. The two are coupled through boundary conditions to realize the pressure field solution under the surface motion boundary.
This method can accurately calculate the pressure field in any boundary motion form, and simultaneously optimize the speed field and boundary conditions, greatly reducing the impact of measurement error on pressure reconstruction.
Smart Images

Figure CN119720852A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of experimental fluid mechanics technology, and in particular to a moving boundary pressure field reconstruction method, system, equipment and medium. Background Art
[0002] Flow field pressure is a basic physical quantity in fluid dynamics, which directly affects the lift and drag of aircraft, ships and other vehicles. At the same time, the interaction between flow field pressure and flow structure is also an important factor causing flow noise and structural vibration. The measurement of instantaneous pressure distribution inside the flow field has always been a difficult point in experimental fluid mechanics. The main method at present is to obtain the velocity field through particle image velocimetry (PIV) technology and then combine it with physical equations to infer the pressure field. However, for curved moving boundary problems such as fish swimming, ventricular diastole and contraction, and bubble deformation, traditional pressure reconstruction methods are difficult to accurately calculate the pressure field of such curved moving boundary. The reason is that there are large errors in experimental measurements, which are mainly reflected in: first, experimental measurements cannot obtain accurate boundary shapes and velocities, and therefore cannot obtain accurate boundary conditions; second, due to the limitation of spatial resolution, PIV cannot accurately analyze the flow near the wall; third, traditional pressure reconstruction methods need to introduce complex boundary processing technology at the moving boundary. How to obtain accurate boundary conditions and reduce the pressure reconstruction error of the flow field under the moving boundary is an urgent problem to be solved. Summary of the invention
[0003] The present invention provides a moving boundary pressure field reconstruction method, system, device and medium to solve the problem that the traditional pressure reconstruction method is difficult to accurately calculate the pressure field of the moving boundary of the curved surface.
[0004] To achieve the above-mentioned object, in a first aspect, the present invention provides a method for reconstructing a moving boundary pressure field, comprising: acquiring moving boundary flow field data, wherein the moving boundary flow field data comprises a velocity field and a moving boundary;
[0005] Generate training data, the training data including velocity supervision data, boundary supervision data and flow parameters, wherein the flow parameters at least include Reynolds number, characteristic length and characteristic velocity;
[0006] Constructing a dual neural network model according to preset parameters, wherein the dual neural network model includes a boundary network and a flow field network;
[0007] Training the dual neural network using the training data;
[0008] The spatial coordinates of the point to be predicted are input, and the trained dual neural network outputs the pressure value of the point accordingly to predict the pressure field and boundary under the motion boundary conditions.
[0009] Preferably, the training of the dual neural network by the training data comprises:
[0010] Generate corresponding batch data according to the input data label and the batch size, wherein the batch data includes flow field supervision data, boundary supervision data, equation residual points, motion boundary residual points and fixed boundary conditions;
[0011] Calculate dynamic weight coefficients α, β and γ;
[0012] Calculate each loss function and the total loss function, and calculate the gradient of the total loss function with respect to the parameters to be trained according to automatic differentiation, wherein the total loss function of the flow field network is composed of four items:
[0013] L total =L eqns +αL b.c. +βL fdat +γL bdat .
[0014] Where L eqns represents the residual of the Navier-Stokes equation; L b.c. Represents the loss of boundary conditions; L fdat Indicates the loss of flow field data; L bdat Indicates the loss of boundary data;
[0015] Using a deep learning optimization algorithm to update the parameters to be trained, the optimization algorithm includes but is not limited to the Adam algorithm and the stochastic gradient descent method;
[0016] Repeat the above training process, regenerate the batch data and perform iterative training until the preset number of training times is met or the difference between the total loss function of two consecutive iterations is less than 10 -6 , then save the trained dual neural network.
[0017] Preferably, the calculation of the dynamic weight coefficients α, β and γ specifically includes: setting the dynamic weight coefficients α, β and γ to balance the convergence speed of each item so that each item converges at a similar rate, when epoch=0 in the first iteration, the weight coefficient is set to a default value of 1; for the remaining iterations, the dynamic weight coefficient is updated according to the following formula:
[0018] in Represents the gradient of the loss function with respect to the neural network parameters, calculated by automatic differentiation; Indicates taking the average of the absolute values.
[0019] Preferably, the step of constructing a dual neural network model according to preset parameters specifically includes:
[0020] The border network The input is time t and the initial position of the boundary Output is the boundary of the previous moment Among them, Θ b.c. Represents the parameters to be trained of the boundary network, and the boundary velocity is obtained by automatic differentiation technology To obtain the complete boundary conditions
[0021] The flow field network adopts a physical neural network to solve the approximate flow field, (U, p) = F flow (t,X;θ flow The input of ) is time t and spatial coordinate X, and the output is velocity field U and pressure field p, where Θ flow Represents the parameters to be trained of the flow field network.
[0022] Preferably, the calculation of each loss function and the total loss function includes:
[0023] The residuals of the incompressible Navier-Stokes equations are calculated by automatic differentiation techniques. The boundary network F b.c. and flow field network L b.c. F flow The speed on the moving boundary is equal, so the loss function L of the boundary condition is minimized b.c. :
[0024] Where N b.c. represents the number of boundary points, ‖·‖2 represents the second norm;
[0025] Minimize the total loss function L total Get the optimal network parameters.
[0026] To achieve the above purpose, in a second aspect, for reconstruction of a three-dimensional flow field, the method includes:
[0027] A data acquisition module, used to acquire motion boundary flow field data, wherein the motion boundary flow field data includes a velocity field and a motion boundary;
[0028] A training data generation module, used to generate training data, wherein the training data includes velocity supervision data, boundary supervision data and flow parameters, wherein the flow parameters include at least Reynolds number, characteristic length and characteristic velocity;
[0029] A model building module, used to build a dual neural network model according to preset parameters, wherein the dual neural network model includes a boundary network and a flow field network;
[0030] A data training module, used for training the dual neural network using the training data;
[0031] The prediction module is used to input the spatial coordinates of the point to be predicted, and the trained dual neural network outputs the pressure value of the point to predict the pressure field and boundary under the motion boundary conditions.
[0032] Preferably, the model building module is specifically used for:
[0033] Generate corresponding batch data according to the input data label and the batch size, wherein the batch data includes flow field supervision data, boundary supervision data, equation residual points, motion boundary residual points and fixed boundary conditions;
[0034] Calculate dynamic weight coefficients α, β and γ;
[0035] Calculate each loss function and the total loss function, and calculate the gradient of the total loss function with respect to the parameters to be trained according to automatic differentiation, wherein the total loss function of the flow field network is composed of four items:
[0036] L total =L eqns +αL b.c. +βL fdat +γL bdat .
[0037] Where L eqns represents the residual of the Navier-Stokes equation; L b.c. Represents the loss of boundary conditions; L fdat Indicates the loss of flow field data; L bdat Indicates the loss of boundary data;
[0038] Using a deep learning optimization algorithm to update the parameters to be trained, the optimization algorithm includes but is not limited to the Adam algorithm and the stochastic gradient descent method;
[0039] Repeat the above training process, regenerate the batch data and perform iterative training until the preset number of training times is met or the difference between the total loss function of two consecutive iterations is less than 10 -6 , then save the trained dual neural network.
[0040] Preferably, the calculation of the dynamic weight coefficients α, β and γ specifically includes: setting the dynamic weight coefficients α, β and γ to balance the convergence speed of each item so that each item converges at a similar rate, when epoch=0 in the first iteration, the weight coefficient is set to a default value of 1; for the remaining iterations, the dynamic weight coefficient is updated according to the following formula:
[0041] in Represents the gradient of the loss function with respect to the neural network parameters, calculated by automatic differentiation; Indicates taking the average of the absolute values.
[0042] Preferably, the model building module is specifically used for:
[0043] The border network The input is time t and the initial position of the boundary Output is the boundary of the previous moment Among them, Θ b.c. Represents the parameters to be trained of the boundary network, and the boundary velocity is obtained by automatic differentiation technology To obtain the complete boundary conditions
[0044] The flow field network adopts a physical neural network to approximate the solution of the flow field.
[0045] (U,p)=F flow (t,X;θ flow The input of ) is time t and spatial coordinate X, and the output is velocity field U and pressure field p, where Θ flow Represents the parameters to be trained of the flow field network.
[0046] To achieve the above-mentioned purpose, in a third aspect, the present invention also relates to an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the above-mentioned method for reconstructing a moving boundary pressure field when executing the computer program.
[0047] To achieve the above objectives, in a fourth aspect, the present invention also relates to a computer-readable storage medium, in which instructions are stored, and when the instructions are executed, the above-mentioned method for reconstructing a moving boundary pressure field is executed.
[0048] The present invention relates to a moving boundary pressure field reconstruction method, system, device and medium, which have the following beneficial effects compared with the prior art:
[0049] In order to solve the pressure reconstruction problem of the flow field under the moving boundary, the present invention proposes a moving boundary pressure field reconstruction technology based on a neural network. The main feature of this technology is that it contains two neural networks, one network is used to track the Lagrangian boundary points, called the boundary network; the other physical neural network is used to approximate the flow field, called the flow field network; the two are coupled through the boundary conditions of the moving boundary to achieve the pressure field solution under the curved moving boundary. The network can optimize the boundary conditions and the velocity field at the same time according to the physical laws, greatly reducing the impact of measurement errors on pressure reconstruction. In order to improve the convergence speed and stability of network training, we further propose a dynamic weight update strategy that considers both the loss size and the gradient. Compared with the traditional pressure field calculation method, the advantages of this algorithm are: 1) It can calculate the pressure under any boundary motion form; 2) It can optimize the velocity field and boundary conditions at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 The method flow of a method for reconstructing a moving boundary pressure field in Embodiment 1 of the present invention is as follows: Figure 1 ;
[0051] Figure 2 The method flow of a method for reconstructing a moving boundary pressure field in Embodiment 1 of the present invention is as follows: Figure 2 ;
[0052] Figure 3 It is a dual neural network framework diagram for calculating the moving boundary pressure field of a curved surface in a moving boundary pressure field reconstruction method in Embodiment 1 of the present invention;
[0053] Figure 4 is a calculation result diagram of Example 1 of a moving boundary pressure field reconstruction method in Embodiment 1 of the present invention;
[0054] Figure 5 is a calculation result diagram of Example 2 of a moving boundary pressure field reconstruction method in Embodiment 1 of the present invention;
[0055] Figure 6 It is a structural schematic diagram of a moving boundary pressure field reconstruction system in Embodiment 2 of the present invention;
[0056] Figure 7 It is a structural schematic diagram of an electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0057] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0058] Embodiment 1
[0059] A method for reconstructing the pressure field of a moving boundary, see Figure 1-Figure 5 , used for dynamic boundary pressure field reconstruction, the present invention proposes a dynamic boundary pressure field reconstruction technology based on a dual neural network model, the neural network is composed of a boundary network and a flow field network, wherein the boundary neural network is responsible for tracking the movement of the Lagrangian boundary points; the flow field network is a physical neural network, responsible for solving the constraints of the Euler flow field. The two are coupled through boundary conditions to achieve the pressure field solution under the curved surface moving boundary.
[0060] The process includes the following steps: S101 to S105.
[0061] S101 acquires moving boundary flow field data, where the moving boundary flow field data includes a velocity field and a moving boundary.
[0062] The velocity field can be obtained through PIV or particle tracking velocimetry (PTV) technology, and the motion boundary can be obtained by grayscale processing of the image; it can also be the velocity field and boundary obtained by numerical simulation.
[0063] S102 generates training data, where the training data includes velocity supervision data, boundary supervision data, and flow parameters, wherein the flow parameters include at least Reynolds number, characteristic length, and characteristic velocity.
[0064] Among them, velocity supervision data and boundary supervision data are generally generated by randomly uniformly selecting points, and flow parameters include Reynolds number, characteristic length, characteristic velocity, etc.
[0065] S103 constructs a dual neural network model according to preset parameters, where the dual neural network model includes a boundary network and a flow field network.
[0066] Among them, the preset parameters include the number of network layers, the number of neurons in each layer, the type of activation function, the learning rate, and the spatial discrete form of the equation points.
[0067] In this embodiment, S103 constructs a dual neural network model according to preset parameters, specifically including:
[0068] Border Network The input is time t and the initial position of the boundary Output is the boundary of the previous moment Among them, Θ b.c. Represents the parameters to be trained of the boundary network, and the boundary velocity is obtained by automatic differentiation technology To obtain the complete boundary conditions
[0069] The flow field network uses a physical neural network to approximate the flow field, (U, p) = F flow (t,X;θ flow The input of ) is time t and spatial coordinate X, and the output is velocity field U and pressure field p, where Θ flow Represents the parameters to be trained of the flow network. The calculated velocity field and pressure field must satisfy the incompressible Navier-Stokes equations so that the flow field satisfies the physical constraints. Minimizing the residual makes the flow field satisfy the constraints of the physical equations.
[0070] S104 trains the dual neural network through training data. The generated speed and boundary supervision data and flow parameters are input into the neural network, and parameters such as the number of iterations and batch size are set to start training the network.
[0071] in, Figure 2 This is a complete flow chart of this step, and the specific process includes: S1041-S1045.
[0072] S1041 generates corresponding batch data according to the input data label and the batch size, where the batch data includes flow field supervision data, boundary supervision data, equation residual points, motion boundary residual points, and fixed boundary conditions.
[0073] S1042 calculates dynamic weight coefficients α, β and γ.
[0074] Since this is a multi-objective optimization task, in order to ensure the convergence of the neural network, we need to set dynamic weight coefficients α, β and g to balance the convergence speed of each item so that each item converges at a similar rate.
[0075] In this embodiment: the dynamic weight coefficients α, β and γ are used to balance the convergence speed of each item, so that each item converges at a similar rate. When epoch=0 for the first iteration, the weight coefficient is set to the default value 1; for the remaining iterations. eqns represents the residual of the Navier-Stokes equation, L b.c. The loss L of the boundary condition fdat , represents the loss of flow field data; L bdat Indicates the loss of boundary data.
[0076] In this embodiment, the dynamic weight coefficient is updated according to the following formula:
[0077] The dynamic weight coefficient in the present invention is updated according to the above formula to obtain the best convergence performance, where Represents the gradient of the loss function with respect to the neural network parameters, calculated by automatic differentiation; It means taking the average of absolute values, and k+1 is the number of iterations.
[0078] S1043 calculates each loss function and the total loss function, and calculates the gradient of the total loss function with respect to the parameters to be trained according to automatic differentiation, wherein the total loss function of the flow field network is composed of four items:
[0079] L total =L eqns +αL b.c. +βL fdat +γL bdat . (1)
[0080] Where L eqns represents the residual of the Navier-Stokes equation, obtained by automatic differentiation; L b.c. Indicates the loss of boundary conditions, that is, the velocity of the flow field on the moving boundary should be equal to the boundary motion velocity; L b.c. represents the loss of boundary conditions, that is, the deviation between the velocity field measured by PIV and the velocity field predicted by the neural network; Lfdat Indicates the loss of flow field data; L bdat Represents the loss of boundary data, that is, the deviation between the measured boundary and the boundary predicted by the neural network.
[0081] In this embodiment, S1043 calculates various loss functions and a total loss function, including:
[0082] The residuals of the incompressible Navier-Stokes equations are calculated by automatic differentiation techniques. The boundary network F b.c. and flow field network L b.c. F flow The speed on the moving boundary is equal, so the loss function L of the boundary condition is minimized b.c. :
[0083] Where N b.c. represents the number of boundary points, ‖·‖2 represents the two-norm; minimize the total loss function L total Get the optimal network parameters.
[0084] S1044 uses a deep learning optimization algorithm to update the parameters to be trained. The optimization algorithm includes but is not limited to the Adam algorithm and the stochastic gradient descent method.
[0085] Although the boundary conditions obtained in the experiment contain noise, they can be used as a supervisory data to guide the convergence direction of the neural network. At this point, we only need to input the corresponding measurement data, and the neural network minimizes the total loss function L total The optimal network parameters can be obtained, and then the boundary conditions, velocity field and pressure field can be calculated through forward propagation.
[0086] S1045 repeats the above training process, regenerates batch data and performs iterative training until the preset number of training times is met or the difference between the total loss functions of two consecutive iterations is less than 10 -6 , then save the trained dual neural network.
[0087] S105 inputs the spatial coordinates of the point to be predicted, and the trained dual neural network outputs the corresponding pressure value of the point to predict the pressure field and boundary under the motion boundary condition.
[0088] In order to better illustrate the invention, two examples are given below:
[0089] Example 1:
[0090] Step 1: Obtain the velocity field and boundary data of the flow field. In this embodiment, we use direct numerical simulation to generate an oscillating cylindrical flow field. The Reynolds number based on the cylinder diameter D is 185, the dimensionless velocity of the incoming flow is 1, and the dimensionless diameter of the cylinder is 1. The cylinder is located at (0,0) and oscillates periodically in the vertical y direction. The motion equation of the cylinder is y c =0.2sin(2πf c t), where y c is the position of the center of the cylinder, t is the dimensionless time, f c is the dimensionless frequency of the cylindrical oscillation, which is set to 0.156 in this embodiment. In order to simulate the PIV measurement results, we intercepted the flow field of -1D≤x≤3D, -1D≤y≤1D (x is the flow direction), the spatial spacing between vectors is 1 / 20, and the time interval is 0.05. In order to be closer to the actual situation, we added Gaussian white noise to the velocity field. The intensity of Gaussian white noise is defined as the ratio of the noise amplitude to the velocity field amplitude, expressed as σ n In this embodiment, the noise intensity σ is added n =8%.
[0091] Step 2: Generate velocity supervision data, boundary supervision data, and flow parameters. 1×10 6 data points, 0.5×10 6 Boundary data points, 1×10 6 equation points, 1×10 6 It should be noted that the generated data does not include the pressure field.
[0092] Step 3: Construct a dual network model according to preset parameters. In this embodiment, the boundary network contains 9 hidden layers, each with 32 neurons; the flow field network contains 13 hidden layers, each with 128 neurons. A total of 207,707 unknown parameters are formed. The initial learning rate is 5×10 -3 , with a step-wise decay, and the learning rate for the last 2000 epochs is set to 1×10 -5 .
[0093] Step 4: Input the generated training data into the neural network. The network epoch is set to 4000, each epoch is iterated 30 times, and the batch size is 10000.
[0094] Step 5: Calculate dynamic weight coefficients α, β and γ. In the first iteration (epoch = 0), the weight coefficients are set to the default value 1; in the remaining iterations, the dynamic weight coefficients are calculated according to formula (2).
[0095] Step 6: Calculate each loss function and the total loss function according to formula (1), and calculate the gradient of the total loss function with respect to the parameters to be trained according to automatic differentiation.
[0096] Step 7: Use a deep learning optimization algorithm to update the parameters to be trained. In this embodiment, the Adam algorithm is used to update the parameters.
[0097] Step 8: Repeat steps 5 to 7 until 4000 epochs are completed and save the network.
[0098] Step 9: Predict the pressure field and boundary under the moving boundary. In this embodiment, the prediction grid space spacing is set to 0.01 and the time interval is set to 0.05. The final predicted pressure field is as follows Figure 4 As shown in Figure 2, the error between the predicted result and the original pressure field is less than 4%.
[0099] Example 2:
[0100] The performance of the present invention is tested by a fish swimming flow field, and the specific steps are as follows:
[0101] Step 1: Obtain the velocity field and boundary data of the flow field. In this embodiment, we use direct numerical simulation to generate the flow field of the fish. The fish body is replaced by a NACA0012 airfoil, with the head at (0,0) and waving in the vertical y direction. The Reynolds number based on the length L of the fish body is 1×10 4 , the incoming flow velocity is 0.1m / s, the fish body length L is 0.1m, the swing wavelength is equal to L, and the swing frequency is 2Hz. In order to simulate the PIV measurement results, we intercepted the flow field of -0.3≤x / L≤1.3,-0.3≤y / L≤0.3 (x is the flow direction), the spatial spacing between the vectors is L / 400, and the time interval is twice the direct numerical simulation interval, that is, 2dt. No Gaussian white noise is added in this embodiment.
[0102] Step 2: Generate velocity supervision data, boundary supervision data and flow parameters. 2×10 6 data points, 1×10 6 Boundary data points, 2×10 6 equation points, 1×10 6 It should be noted that the generated data does not include the pressure field.
[0103] Step 3: Construct a dual network model according to preset parameters. In this embodiment, the boundary network contains 9 hidden layers, each with 48 neurons; the flow field network contains 13 hidden layers, each with 150 neurons. A total of 291,981 unknown parameters are formed. The initial learning rate is 5×10 -3, with a step-wise decay, and the learning rate for the last 2000 epochs is set to 1×10 -5 .
[0104] Step 4: Input the generated training data into the neural network. The network epoch is set to 18000, each epoch is iterated 30 times, and the batch size is 10000.
[0105] Step 5: Calculate dynamic weight coefficients α, β and γ. In the first iteration (epoch = 0), the weight coefficients are set to the default value 1; in the remaining iterations, the dynamic weight coefficients are calculated according to formula (2).
[0106] Step 6: Calculate each loss function and the total loss function according to formula (1), and calculate the gradient of the total loss function with respect to the parameters to be trained according to automatic differentiation;
[0107] Step 7: Use a deep learning optimization algorithm to update the parameters to be trained. In this embodiment, the Adam algorithm is used to update the parameters.
[0108] Step 8: Repeat steps 5 to 7 until 18,000 epochs are completed and the network is saved.
[0109] Step 9: Predict the pressure field and boundary under the moving boundary. In this embodiment, the prediction grid space spacing is set to L / 400 and the time interval is 2dt. The final predicted pressure field is as follows Figure 5 As shown in Figure 2, the error between the predicted result and the original pressure field is less than 20%.
[0110] Embodiment 2
[0111] A moving boundary pressure field reconstruction system for Figure 6 , including a data acquisition module 61, a training data generation module 62, a model construction module 63, a data training module 64 and a prediction module 65.
[0112] A data acquisition module 61 is used to acquire motion boundary flow field data, where the motion boundary flow field data includes a velocity field and a motion boundary;
[0113] A training data generation module 62, used to generate training data, the training data includes velocity supervision data, boundary supervision data and flow parameters, wherein the flow parameters at least include Reynolds number, characteristic length and characteristic velocity;
[0114] A model building module 63, used to build a dual neural network model according to preset parameters, the dual neural network model includes a boundary network and a flow field network;
[0115] A data training module 64, used for training the dual neural network through training data;
[0116] The prediction module 65 is used to input the spatial coordinates of the point to be predicted, and the trained dual neural network outputs the pressure value of the point accordingly to predict the pressure field and boundary under the motion boundary conditions.
[0117] In some embodiments, the data training module 64 is specifically configured to:
[0118] Generate corresponding batch data according to the input data label and batch size, the batch data includes flow field supervision data, boundary supervision data, equation residual points, motion boundary residual points and fixed boundary conditions;
[0119] Calculate dynamic weight coefficients α, β and γ;
[0120] Calculate each loss function and the total loss function, and calculate the gradient of the total loss function with respect to the parameters to be trained based on automatic differentiation. The total loss function of the flow field network consists of four items:
[0121] L total =L eqns +αL b.c. +βL fdat +γL bdat .
[0122] Where L eqns represents the residual of the Navier-Stokes equation; L b.c. Represents the loss of boundary conditions; L fdat Indicates the loss of flow field data; L bdat Indicates the loss of boundary data;
[0123] Use deep learning optimization algorithms to update the parameters to be trained. The optimization algorithms include but are not limited to the Adam algorithm and the stochastic gradient descent method.
[0124] Repeat the above training process, regenerate batch data and perform iterative training until the preset number of training times is met or the difference between the total loss function of two consecutive iterations is less than 10 -6 , then save the trained dual neural network.
[0125] In some embodiments, the dynamic weight coefficients α, β and γ are calculated in the data training module 64, specifically including: dynamically setting the weight coefficients α, β and γ to balance the convergence speed of each item, so that each item converges at a similar rate, when epoch=0 in the first iteration, the weight coefficient is set to the default value 1; for the remaining iterations, the dynamic weight coefficient is updated according to the following formula:
[0126] in Represents the gradient of the loss function with respect to the neural network parameters, calculated by automatic differentiation; Indicates taking the average of the absolute values.
[0127] In some embodiments, the model building module 63 is specifically configured to:
[0128] Border Network The input is time t and the initial position of the boundary Output is the boundary of the previous moment Among them, Θ b.c. Represents the parameters to be trained of the boundary network, and the boundary velocity is obtained by automatic differentiation technology To obtain the complete boundary conditions
[0129] The flow field network uses a physical neural network to approximate the flow field, (U, p) = F flow (t,X;θ flow The input of ) is time t and spatial coordinate X, and the output is velocity field U and pressure field p, where Θ flow Represents the parameters to be trained of the flow field network.
[0130] The moving boundary pressure field reconstruction system of this embodiment has the same implementation process, method and effect as the moving boundary pressure field reconstruction method described in the first embodiment, and will not be described in detail here.
[0131] Embodiment 3
[0132] like Figure 7 As shown, this embodiment relates to an electronic device including at least one processor and a memory connected to the at least one processor in communication. The memory stores a computer program that can be run by at least one processor, and the computer program is executed by at least one processor so that at least one processor can execute a moving boundary pressure field reconstruction method of Example 1, and achieve a corresponding beneficial effect of a moving boundary pressure field reconstruction method, which will not be repeated here. The electronic device provided in this embodiment can be a personal computer, such as a desktop computer, an all-in-one computer, a laptop computer, a tablet computer, etc., and can also be a terminal device such as a mobile phone, a wearable device, a PDA, etc. The electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0133] The components of the electronic device 3 may include, but are not limited to: the at least one processor 4 mentioned above, the at least one memory 5 mentioned above, and a bus 6 connecting different system components (including the memory 5 and the processor 4).
[0134] The bus 6 includes a data bus, an address bus and a control bus.
[0135] The memory 5 may include a volatile memory, such as a random access memory (RAM) 51 and / or a cache memory 52 , and may further include a read-only memory (ROM) 53 .
[0136] The memory 5 may also include a program / utility 55 having a set (at least one) of program modules 54, such program modules 54 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0137] The processor 4 executes various functional applications and data processing by running the computer program stored in the memory 5, such as the above-mentioned moving boundary pressure field reconstruction method.
[0138] The electronic device 3 may also communicate with one or more external devices 7 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 8. Furthermore, the electronic device 3 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 9. Figure 5 As shown, the network adapter 9 communicates with other modules of the electronic device 3 via the bus 6. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 3, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0139] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0140] Embodiment 4
[0141] The present invention relates to a computer-readable storage medium, which stores instructions. When the instructions are executed, a method for reconstructing a moving boundary pressure field is implemented. The execution process method and effect of the method are the same as those of the method for reconstructing a moving boundary pressure field described in Example 1, and will not be repeated here.
[0142] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0143] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for reconstructing a moving boundary pressure field, characterized in that: include: Acquiring motion boundary flow field data, wherein the motion boundary flow field data includes a velocity field and a motion boundary; Generate training data, the training data including velocity supervision data, boundary supervision data and flow parameters, wherein the flow parameters at least include Reynolds number, characteristic length and characteristic velocity; Constructing a dual neural network model according to preset parameters, wherein the dual neural network model includes a boundary network and a flow field network; Training the dual neural network using the training data; The spatial coordinates of the point to be predicted are input, and the trained dual neural network outputs the pressure value of the point accordingly to predict the pressure field and boundary under the motion boundary conditions.
2. A moving boundary pressure field reconstruction method according to claim 1, characterized in that: The step of training the dual neural network by using the training data comprises: Generate corresponding batch data according to the input data label and the batch size, wherein the batch data includes flow field supervision data, boundary supervision data, equation residual points, motion boundary residual points and fixed boundary conditions; Calculate dynamic weight coefficients α, β and γ; Calculate each loss function and the total loss function, and calculate the gradient of the total loss function with respect to the parameters to be trained according to automatic differentiation, wherein the total loss function of the flow field network is composed of four items: L total =L eqns +αL b.c. +βL fdat +γL bdat . Where L eqns represents the residual of the Navier-Stokes equation; L b.c. Represents the loss of boundary conditions; L fdat Indicates the loss of flow field data; L bdat Indicates the loss of boundary data; Using a deep learning optimization algorithm to update the parameters to be trained, the optimization algorithm includes but is not limited to the Adam algorithm and the stochastic gradient descent method; Repeat the above training process, regenerate the batch data and perform iterative training until the preset number of training times is met or the difference between two consecutive iterations of the total loss function is less than 10 -6 , then save the trained dual neural network.
3. A moving boundary pressure field reconstruction method according to claim 2, characterized in that: The calculation of the dynamic weight coefficients α, β and γ specifically includes: setting the dynamic weight coefficients α, β and γ to balance the convergence speed of each item so that each item converges at a similar rate. When epoch=0 in the first iteration, the weight coefficient is set to a default value of 1; for the remaining iterations, the dynamic weight coefficient is updated according to the following formula: in Represents the gradient of the loss function with respect to the neural network parameters, calculated by automatic differentiation; It means taking the average of absolute values, and k+1 is the number of iterations.
4. A moving boundary pressure field reconstruction method according to claim 2, characterized in that: The dual neural network model is constructed according to preset parameters, specifically including: The border network The input is time t and the initial position of the boundary Output is the boundary of the previous moment Among them, Θ b.c. Represents the parameters to be trained of the boundary network, and the boundary velocity is obtained by automatic differentiation technology To obtain the complete boundary conditions The flow field network adopts a physical neural network to solve the approximate flow field, (U, p) = F flow (t,X;θ flow The input of ) is time t and spatial coordinate X, and the output is velocity field U and pressure field p, where Θ flow Represents the parameters to be trained of the flow field network.
5. A moving boundary pressure field reconstruction method according to claim 1, characterized in that: The calculation of each loss function and the total loss function includes: The residuals of the incompressible Navier-Stokes equations are calculated by automatic differentiation techniques. The boundary network F b.c. and flow field network L b.c. F flow The speed on the moving boundary is equal, so the loss function L of the boundary condition is minimized b.c. : Where N b.c. represents the number of boundary points, ‖·‖2 represents the second norm; Minimize the total loss function L total Get the optimal network parameters.
6. A moving boundary pressure field reconstruction system, characterized in that: include: A data acquisition module, used to acquire motion boundary flow field data, wherein the motion boundary flow field data includes a velocity field and a motion boundary; A training data generation module, used to generate training data, wherein the training data includes velocity supervision data, boundary supervision data and flow parameters, wherein the flow parameters include at least Reynolds number, characteristic length and characteristic velocity; A model building module, used to build a dual neural network model according to preset parameters, wherein the dual neural network model includes a boundary network and a flow field network; A data training module, used for training the dual neural network using the training data; The prediction module is used to input the spatial coordinates of the point to be predicted, and the trained dual neural network outputs the pressure value of the point to predict the pressure field and boundary under the motion boundary conditions.
7. A moving boundary pressure field reconstruction system according to claim 6, characterized in that: The model building module is specifically used for: Generate corresponding batch data according to the input data label and the batch size, wherein the batch data includes flow field supervision data, boundary supervision data, equation residual points, motion boundary residual points and fixed boundary conditions; Calculate dynamic weight coefficients α, β and γ; Calculate each loss function and the total loss function, and calculate the gradient of the total loss function with respect to the parameters to be trained according to automatic differentiation, wherein the total loss function of the flow field network is composed of four items: L total =L eqns +αL b.c. +βL fdat +γL bdat . Where L eqns represents the residual of the Navier-Stokes equation; L b.c. Represents the loss of boundary conditions; L fdat Indicates the loss of flow field data; L bdat Indicates the loss of boundary data; Using a deep learning optimization algorithm to update the parameters to be trained, the optimization algorithm includes but is not limited to the Adam algorithm and the stochastic gradient descent method; Repeat the above training process, regenerate the batch data and perform iterative training until the preset number of training times is met or the difference between the total loss function of two consecutive iterations is less than 10 -6 , then save the trained dual neural network.
8. A moving boundary pressure field reconstruction system according to claim 6, characterized in that: The calculation of the dynamic weight coefficients α, β and γ specifically includes: setting the dynamic weight coefficients α, β and γ to balance the convergence speed of each item so that each item converges at a similar rate. When epoch=0 in the first iteration, the weight coefficient is set to a default value of 1; for the remaining iterations, the dynamic weight coefficient is updated according to the following formula: in Represents the gradient of the loss function with respect to the neural network parameters, calculated by automatic differentiation; It means taking the average of absolute values, and k+1 is the number of iterations.
9. A moving boundary pressure field reconstruction system according to claim 6, characterized in that: The model building module is specifically used for: The border network The input is time t and the initial position of the boundary Output is the boundary of the previous moment Among them, Θ b.c. Represents the parameters to be trained of the boundary network, and the boundary velocity is obtained by automatic differentiation technology To obtain the complete boundary conditions The flow field network adopts a physical neural network to solve the approximate flow field, (U, p) = F flow (t,X;θ flow The input of ) is time t and spatial coordinate X, and the output is velocity field U and pressure field p, where Θ flow Represents the parameters to be trained of the flow field network.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, a moving boundary pressure field reconstruction method as described in any one of claims 1-5 is implemented.
11. A computer-readable storage medium, characterized in that: The storage medium stores instructions, which, when executed, execute a moving boundary pressure field reconstruction method as described in any one of claims 1-5.
Citation Information
Patent Citations
Static pressure oil pad flow field characteristic simulation optimizing method
CN103226633A
Method and system for reconstructing ultrasonic vessel velocity field and pressure field based on neural network
CN117198542A
Fluid mechanics equation solving method based on physical information neural network
CN117786286A
Method, electronic device and computer readable medium for information processing for accelerating neural network training
US20210117776A1