A prediction method for thermal hydraulic heat transfer coefficient based on physical constraint neural network

By introducing physical constraints and PDE conservation equations into neural network models, the robustness problem of traditional machine learning methods under data sparseness and nonlinear constraints in complex heat exchange devices is solved, and the thermal hydraulic heat exchange coefficient prediction with higher accuracy and universality is achieved.

CN116341399BActive Publication Date: 2025-04-11CHINA NUCLEAR POWER OPERATION TECH CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111526480.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2025-04-11
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

In complex heat exchange devices, traditional machine learning methods lack robustness due to the complexity of data sparseness and nonlinear physical constraints, and cannot provide effective prediction and decision support.

Method used

A neural network model based on physical constraints is adopted to construct PDE conservation equations through an automatic differential mechanism, and a loss function is constructed in combination with mass conservation and energy conservation constraints to improve the training accuracy and generalization ability of the model.

Benefits of technology

With less training data, higher prediction accuracy and stronger universality are achieved, which can effectively couple the laws of physics and provide reliable prediction of thermal hydraulic heat exchange coefficients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116341399B_ABST
    Figure CN116341399B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of thermal hydraulic simulation of nuclear power plants, and specifically relates to a method for predicting thermal hydraulic heat transfer coefficient based on a physical constraint neural network. The method comprises the following steps: S1 obtaining a training set and a test set; S2 constructing a physical constraint neural network model, wherein the physical constraint neural network model comprises a neural network model body and a PDE conservation equation based on an automatic differentiation mechanism, and constructing a first type of loss function based on the neural network model body and a second type of loss function based on the PDE conservation equation; S3 training the physical constraint neural network model based on the training set and the test set; S4 predicting the thermal hydraulic heat transfer coefficient based on the trained physical constraint neural network model. The method has the advantages of effectively coupling the PDE equation based on the laws of physics, so that better training accuracy can be obtained in relatively fewer training sets; at the same time, the generalization of the training model is also improved, and the universality is stronger.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of thermal hydraulic simulation of nuclear power plants, and in particular relates to a thermal hydraulic heat transfer coefficient prediction method based on a physical constraint neural network. Background Art

[0002] Complex fluids are ubiquitous in nature and industrial processes. Accurately simulating the basic heat transfer behavior of fluids is indispensable in the research of many disciplines such as chemical engineering, thermal power, and aerospace. Usually, researchers need to measure a large amount of experimental data (such as temperature, velocity, pressure, etc.) to build models for parameter analysis, performance characterization, and model optimization. Traditional machine learning methods (deep / convolutional / recurrent neural networks) can maximize the use of the information contained in the above data to build high-fidelity heat transfer models to accurately describe the "input-output" relationship, which can then be used for state monitoring, product quality control, and risk prediction. However, for most complex heat exchange devices with microscopic and closed features (such as microscale heat exchangers and high-temperature radiation heat exchangers), the measurement cost of key information data of their internal physical fields is high or even difficult to measure. Researchers often need to build models or make decisions under sparse data conditions. This leads to the lack of robustness of most traditional machine learning methods and the inability to provide convergence guarantees. In addition, it should be noted that the internal fluid system of the heat exchanger is usually controlled by a highly nonlinear PDE equation group, and the physical constraints are constrained by basic physical laws. Blindly learning physical field information with data-driven methods may result in results that are difficult to explain or even violate physical laws. Summary of the invention

[0003] The purpose of the present invention is to provide a method for predicting thermal hydraulic heat transfer coefficients based on a physical constraint neural network, which can effectively couple a group of nonlinear partial differential equations (such as PDE equations) based on physical laws, can solve supervised learning problems under conditions of a small amount of boundary and sampling data, and has high prediction accuracy and stronger universality.

[0004] The technical solution of the present invention is as follows: A method for predicting thermal hydraulic heat transfer coefficient based on a physical constraint neural network comprises the following steps:

[0005] S1 obtains the training set and the test set;

[0006] S2 constructs a physical constraint neural network model, wherein the physical constraint neural network model includes a neural network model ontology and a PDE conservation equation based on an automatic differentiation mechanism, and constructs a first type of loss function based on the neural network model ontology and a second type of loss function based on the PDE conservation equation;

[0007] S3 trains the physical constraint neural network model based on the training set and the test set;

[0008] S4 predicts the thermal hydraulic heat transfer coefficient based on the trained physical constraint neural network model.

[0009] In step S1, obtaining a training set and a test set includes the following steps:

[0010] S11 Collect data from high-confidence simulations or experiments x k ; x represents the flow field characteristic variable

[0011] S12 prepares the training target set Y=f(x) based on the PDE solution data;

[0012] S13 selects appropriate data from the data xk and the training target set Y=f(x), and performs dimensionality reduction processing on the selected data to serve as the training set and test set of the physical constraint neural network model.

[0013] In step S11, the collected data xk is preprocessed to ensure that the data obtained from various sources are consistent with the conservation equation in terms of dimension and averaging operation method;

[0014] In step S11, for large data sets, principal component analysis (PCA) is also used to reduce the dimension of the data.

[0015] In step S13, the collected data of the training set and the test set are normalized respectively; the mean of each feature in the data set is subtracted and divided by the variance.

[0016] The PDE conservation equations include the mass conservation equation and the energy conservation equation.

[0017] The mass conservation equation is:

[0018]

[0019]

[0020] The energy conservation equation is

[0021]

[0022]

[0023] Among them, cross-sectional area A, pressure P, liquid internal energy u f 、Gas internal energy u g , volume fraction α f , vacuolar fraction α g , non-condensable gas (air) mass fraction X n , gas phase flow rate v g , liquid phase flow rate vf 、Wall heat transfer Q W , gas phase density ρ g , liquid density ρ f , net mass transfer rate between phases Γ g , mass transfer between fluids Γ ig , wall mass transfer Γ W .

[0024] The loss function of the PINN network is:

[0025] L PINN =L NN +L M +L E

[0026] Among them, the first type of loss function is the network's own loss function L NN , the second type of loss function includes the loss function L based on mass conservation constraint M and is the loss function L based on energy conservation constraints E .

[0027]

[0028]

[0029]

[0030] Among them, Q W Actual nodal wall heat transfer, is the node wall heat transfer predicted by the network; A is the cross-sectional area of ​​the pipeline to be predicted, pressure (P), liquid and gas internal energy (u f ,u g ), vacuolar fraction (α g ), non-condensable gas (air) mass fraction (X n ), liquid and gas velocity (v f ,v g ).

[0031] Training the physical constraint neural network model based on the training set and the test set includes:

[0032] S31 adjusts the closed parameters of the model based on machine learning based on the PINN algorithm to obtain the corresponding closed relationship: ML(X)≈Y;

[0033] S32 using the closed relationship ML(X)≈Y to solve the thermal hydraulic conservation equation;

[0034] S33 determines whether the calculated value in step S32 converges to a tolerance interval from the target value. If it fails the convergence test, go to step S31 and continue to adjust and obtain a new closed relationship until it passes the convergence test, then save and output the closed relationship, where the tolerance interval is selected as a preset value.

[0035] The beneficial effects of the present invention are as follows: in the process of establishing the network, the present invention adds additional physical equation constraints, effectively couples the PDE equations based on physical laws, so that better training accuracy can be obtained with relatively fewer training sets; at the same time, the generalization of the training model is also improved, and the universality is stronger. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic flow chart of a method for predicting thermal hydraulic heat transfer coefficient based on a physical constraint neural network provided by the present invention;

[0037] Figure 2 It is a structural schematic diagram of an embodiment of a physical constraint neural network model of the present invention;

[0038] Figure 3 A schematic diagram of the workflow of another embodiment of the prediction method of the present invention;

[0039] Figure 4 for Figure 1 A schematic diagram of the structure of the data sources of the training set and the test set in the illustrated embodiment;

[0040] Figure 5 This is a comparison chart of the PINN and DNN test results for the test set (three control rods dropped);

[0041] Figure 6 Schematic diagram of the relative error structure comparison of PINN and DNN tests in the test set (three control rods dropped). DETAILED DESCRIPTION

[0042] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] like Figure 1 As shown, the present invention discloses a method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network, comprising the following steps:

[0044] S1 obtains the training set and the test set;

[0045] S2 constructs a physical constraint neural network model, wherein the physical constraint neural network model includes a neural network model body and a PDE conservation equation based on an automatic differentiation mechanism, and constructs a first type of loss function based on the neural network model body and a second type of loss function based on the PDE conservation equation;

[0046] S3 trains the physical constraint neural network model based on the training set and the test set;

[0047] S4 predicts the thermal hydraulic heat transfer coefficient based on the trained physical constraint neural network model.

[0048] As a preferred solution, in step S1, obtaining a training set and a test set includes the following steps:

[0049] S11 collects data xk from high-confidence simulations or experiments; x represents the flow field characteristic variables;

[0050] S12 solves the data based on the PDE method to prepare the training target set y=f(x), where Y represents the heat transfer coefficient;

[0051] S13 selects appropriate data from the data xk; and the corresponding training target set y=f(x) as candidate data for the training set and the test set, and performs dimensionality reduction processing on the candidate data to serve as the training set and the test set of the physical constraint neural network model.

[0052] In step S1, the data calculated by the thermal hydraulic program of the two-phase flow PDE is first solved, and then appropriate data are selected from the above data sources as training data and test data of the model.

[0053] The flow field characteristic variable x can be the coolant temperature on the primary circuit side and the gas phase temperature, liquid phase temperature, cavitation fraction, node pressure, liquid phase internal energy, gas phase internal energy, wall heat transfer Q W Etc., further, in step S11, the collected flow field characteristic variable data xk is preprocessed to ensure that the data obtained from various sources are consistent with the conservation equation PDE in terms of dimension and averaging operation method. In addition, in this embodiment, for large data sets, principal component analysis (PCA) is also used to reduce the dimension of the data for data normalization processing so that the weight of each data source is roughly equal.

[0054] In step S12, the training target set y=f(x) can be prepared by solving the data according to the PDE method, and the training target set y=f(x) can be obtained, and then the process proceeds to step S13, and appropriate data are selected from the data calculated by the thermal hydraulic program for solving the two-phase flow PDE as the test set and the training set respectively.

[0055] In step S13, in order to make the training data and test data recognizable by the model, the collected training set and test set data are normalized to achieve dimensionality reduction. As a preferred solution, each feature in the training set and the test set can be subtracted from its mean and divided by the variance for normalization.

[0056] In this embodiment, Figure 4 As shown, in step S1, one of the steam generators in the simulation program is selected as the data set source. The steam generator is divided into four nodes in the simulation program, and the first-circuit side coolant temperature and the second-circuit side gas phase temperature, liquid phase temperature, cavitation fraction, node pressure, liquid phase internal energy, gas phase internal energy, wall heat transfer, and node relative position of these four nodes are extracted respectively. The steam generator is a vertical U-tube steam generator, and the first-circuit side coolant temperature is divided into the rising section and the descending section coolant temperature; the simulation program is based on RELAP5, and RELAP5 assumes that steam is generated in a saturated state, so the heat transfer of the wall to the gas phase during the boiling process of the near-wall boundary layer is The heat transfer from the wall to the near-wall boundary layer is completely transferred to the liquid phase, that is, The input of the relative position of the nodes is to construct the mass conservation constraint. The node positions from bottom to top are specified as 1, 2, 3, and 4. The node diagram of the steam generator is shown in Figure 4 shown.

[0057] Using data from steady-state operation to train the network is not scalable, so the data of dropping two control rods at 5s and dropping one control rod within one minute at 5s, 15s, 35s, and 45s are collected as the training set, and the data of dropping one control rod at 5s, 20s, and 40s are collected as the test set.

[0058] The network output is the wall heat transfer Q W , gas phase density ρ g , liquid density ρ f , gas phase flow rate v g , liquid phase flow rate v f , where the gas and liquid phase densities and flow rates are used to construct mass conservation constraints. The collected data are normalized, and each feature in the data set is subtracted from its mean and divided by its variance.

[0059] After obtaining the data of the training set and the test set, go to step S2 to build a physical constraint neural network model. The PINN network structure constructed in this paper is as follows: Figure 2 The physical constraint neural network model shown in the present invention uses the automatic differentiation mechanism to construct the PDE conservation equation, and then adds an additional loss function based on the PDE (adding the constraint of the boundary condition), and then uses back propagation (Back Propagation) and L-BFGS optimizer to adjust the neural network weight coefficients, which constrains the physical constraints in the form of equations, thereby improving the accuracy and versatility of the model prediction.

[0060] In this embodiment, as a preferred solution, the physical constraint neural network model contains 8 hidden layers of fully connected layers connected in a sequential model, each hidden layer contains 20 neurons, and the activation function of the hidden layer is the hyperbolic tangent tanh function. The first type of loss function is the difference LNN between the actual node wall heat transfer and the node wall heat transfer predicted by the network; the second type of loss function includes LM for mass conservation constraints and LE for energy conservation constraints, that is, the corresponding PINN network loss function is:

[0061] L PINN =L NN +L M +L E

[0062] Specifically, in this embodiment, the difference between the actual node wall heat transfer and the node wall heat transfer predicted by the network is selected as the first type of loss function.

[0063]

[0064] L NN =Q

[0065] At the same time, the PDE conservation equation is constructed by using the automatic differentiation mechanism, and then an additional loss function based on the PDE is added. In this embodiment, as a preferred solution, mass conservation and energy conservation are selected as constraints, as shown below.

[0066] Conservation of mass:

[0067]

[0068]

[0069] Cross-sectional area A, pressure P, internal energy of liquid u f 、Gas internal energy u g , vacuolar fraction α g , gas phase flow rate v g , liquid phase flow rate v f ,, gas phase density ρ g , liquid density ρ f .

[0070] No mass source is included in the flow. Considering the overall continuity, the liquid generation term is the negative value of the steam generation term, that is:

[0071] Γ f =-Γ g

[0072] In the simulation model, the cross-sectional area of ​​each node is equal, and the cross-sectional area A does not change with x. The loss function based on the mass conservation constraint combined with the equation is:

[0073]

[0074] Conservation of Energy:

[0075]

[0076]

[0077] Cross-sectional area A, pressure P, internal energy of liquid u f 、Gas internal energy u g , vacuolar fraction α g , non-condensable gas (air) mass fraction X n , gas phase flow rate v g , liquid phase flow rate v f 、Wall heat transfer Q W , gas phase density ρ g , liquid density ρ f .

[0078] In the simulation model, the cross-sectional area of ​​each node is equal, and the cross-sectional area A of the node does not change with x; the size of the loss function affects the gradient descent speed during the back propagation of the neural network. When constructing the loss function based on energy conservation, the 3, 4, 5, 6, and 7 items on the right side of the equation are not easy to obtain, so the impact on the loss function is ignored. Combined with the equation, the loss function based on the energy conservation constraint is:

[0079]

[0080] Step S3 trains the physical constraint neural network model based on the training set and the test set; in this embodiment, the PINN adds the difference of the physical equation after iteration as the constraint to the loss function during each round of network training. During the training iteration, the neural network optimizes not only the loss function of the network itself, but also the difference of each iteration of the physical equation, and the final training result can satisfy the equation as the constraint.

[0081] Specifically, the steps include:

[0082] S31 adjusts the closed parameters of the model based on machine learning based on the PINN algorithm to obtain the corresponding closed relationship: ML(X)≈Y;

[0083] S32 uses the closed relationship ML(X)≈Y to solve the thermal hydraulic conservation equation;

[0084] S33 determines whether the calculated value in step S32 converges to a tolerance interval from the target value. If it does not pass the convergence test, go to step S31 and continue to adjust and obtain a new closed relationship until it passes the convergence test, then save and output the closed relationship. The tolerance interval is selected as a preset value.

[0085] In step S31, as a preferred solution, the three loss functions can be iterated based on the gradient descent algorithm. When it is determined that the three loss functions are all in a decreasing state, the corresponding closed relationship can be obtained: ML(X)≈Y;

[0086] In step S32, the closed relationship ML(X)≈Y obtained in step S31 is substituted into the mass conservation equation and the energy conservation equation for solution, and variables such as temperature / pressure / cavitation fraction and takeover flow rate of each hydraulic node in the loop are obtained, and then step S33 is entered to determine whether the above calculated values ​​diverge, that is, whether the calculated values ​​converge to a tolerance interval from the target value. If the calculated values ​​diverge, it means that the convergence test has not passed, and then step S31 is entered to obtain the next closed relationship until it meets the requirements.

[0087] S4 predicts the thermal hydraulic heat transfer coefficient based on the trained physical constraint neural network model.

[0088] The following prediction method using a DNN network is compared with the prediction method shown in the present invention to further verify the working effect of the present invention. Figure 5 The comparison between the prediction of the PINN network on the test set and the prediction of the DNN network and the true value when three control rods are dropped. It can be seen from the figure that the fitting effect of PINN on the validation set is significantly better than that of DNN, and DNN cannot respond well to the parameter fluctuations caused by the drop of control rods. Figure 6 To verify the relative error of the predictions of the on-machine PINN and DNN networks relative to the true value, it can be seen from the figure that the relative error of the DNN model is greater than the relative error of the PINN model in most cases; the peak value of the relative error of the DNN model at nodes 1, 2, and 3 is significantly greater than that of the PINN model; the peak value of the relative error of the PINN model at node 4 is slightly greater than that of the DNN model.

[0089] The present invention is described with reference to specific embodiments, but it will be appreciated by those skilled in the art that various changes and equivalent substitutions may be made without departing from the scope of the present invention. In addition, to adapt to specific occasions or materials of the present invention, the present invention may be modified in many ways without departing from its scope. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all embodiments falling within the scope of the claims.

Claims

1. A method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network, characterized in that: The steps include: S1 obtains the training set and the test set; S2 constructs a physical constraint neural network model, wherein the physical constraint neural network model includes a neural network model body and a PDE conservation equation based on an automatic differentiation mechanism, and constructs a first type of loss function based on the neural network model body and a second type of loss function based on the PDE conservation equation; S3 trains the physical constraint neural network model based on the training set and the test set; S4 predicts the thermal hydraulic heat transfer coefficient based on the trained physical constraint neural network model; The loss function of the PINN network is: L PINN =L NN +L M +L E Among them, the first type of loss function is the network's own loss function L NN , the second type of loss function includes the loss function L based on mass conservation constraint M and is the loss function L based on energy conservation constraints E ; Among them, Q w Actual nodal wall heat transfer, is the node wall heat transfer predicted by the network; A is the cross-sectional area of ​​the pipeline to be predicted, pressure (P), liquid and gas internal energy (u f ,u g ), vacuolar fraction (α g ), non-condensable gas mass fraction (X n ), liquid and gas velocity (v f ,v g ).

2. The method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network according to claim 1 is characterized in that: In step S1, obtaining a training set and a test set includes the following steps: S11 Collect data from high-confidence simulations or experiments x k ; x represents the characteristic variable of the flow field; S12 prepares the training target set Y=f(x) based on the PDE solution data; S13 From the data x k ; and selecting appropriate data from the training target set Y=f(x), and performing dimensionality reduction processing on the selected data to serve as the training set and test set of the physical constraint neural network model.

3. The method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network according to claim 2, characterized in that: In step S11, for the collected data x k ; Preprocessing to ensure that the data obtained from various sources are consistent with the conservation equations in terms of dimensions and averaging operations; In step S11, for large data sets, principal component analysis is also used to reduce the dimension of the data.

4. The method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network according to claim 2 is characterized in that: In step S13, the collected data of the training set and the test set are normalized respectively; the mean of each feature in the training set and the test set is subtracted and divided by the variance.

5. The method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network according to claim 1, characterized in that: The PDE conservation equations include the mass conservation equation and the energy conservation equation. The mass conservation equation is: The energy conservation equation is Among them, cross-sectional area A, pressure P, liquid internal energy u f 、Gas internal energy u g , volume fraction α f , vacuolar fraction α g 、Non-condensable gas mass fraction X n , gas phase flow rate v g , liquid phase flow rate v f 、Wall heat transfer Q W , gas phase density ρ g , liquid density ρ f , net mass transfer rate between phases Γ g , mass transfer between fluids Γ ig , wall mass transfer Γ W .

6. The method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network according to claim 1, characterized in that: Training the physical constraint neural network model based on the training set and the test set includes: S31 adjusts the closed parameters of the model based on machine learning based on the PINN algorithm to obtain the corresponding closed relationship: ML(X)≈Y.

7. The method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network according to claim 6, characterized in that: Training the physical constraint neural network model based on the training set and the test set includes: S32 uses the closed relationship ML(X)≈Y to solve the thermal hydraulic conservation equation.

8. The method for predicting thermal hydraulic heat transfer coefficient based on physical constraint neural network according to claim 6, characterized in that: Training the physical constraint neural network model based on the training set and the test set includes: S33 determines whether the calculated value in step S32 converges to a tolerance interval from the target value. If it fails the convergence test, go to step S31 and continue to adjust and obtain a new closed relationship until it passes the convergence test, then save and output the closed relationship, where the tolerance interval is selected as a preset value.

Citation Information

Patent Citations

  • Radial basis function (RBF) neural network-based boiling heat exchanging prediction method

    CN102419827A

  • Reinforced system thermal-hydraulic behavior simulation method

    CN102542164A