Gradient-Based Equation Adaptive Weighting in Physics-Informed Neural Networks for Water Hammer Analysis
Yibo Li, Fude Ren, Xiaolei WangTo address the issues of optimization instability and imbalance in the contributions of multiple governing equations in conventional Physics-Informed Neural Networks (PINNs) for hydraulic transient problems, a gradient-based equation adaptive weighting strategy is proposed in this study. This strategy is incorporated into the PINN framework, referred to as GEAW-PINNs (gradient-based equation adaptive weighting in Physics-Informed Neural Networks), for predicting pressure and flow velocity during water hammer events. In GEAW-PINNs, the loss terms associated with different governing equations in the partial differential equation (PDE) constraints are dynamically weighted, thereby enhancing training stability. In the model construction, the classical governing equations of water hammer are employed to establish the PDE constraints, in which the Brunone model is incorporated. Meanwhile, the corresponding model coefficient is treated as a trainable parameter, enabling simultaneous parameter inversion and prediction of pressure and flow velocity. High-accuracy numerical solutions are generated as reference data to validate the proposed framework. The results demonstrate that GEAW-PINN effectively improves the stability of PINNs for the prediction of pressure in water hammer phenomena, thereby enhancing overall optimization performance and prediction accuracy. For the reservoir–pipeline–valve system, the proposed method achieved relative errors of only 0.00742 for pressure and 0.0183 for velocity. And the proposed method can also provide accurate predictions in complex pipe network systems. For the pipeline network system, the absolute prediction errors were approximately 15 for pressure and 0.05 for velocity. Finally, the robustness of the proposed method was evaluated under different random seeds and 25 dB noise. The prediction error exhibited little variation across different random seeds, with a variance of only 1.1429×10−7 and 6.87×10−7. Under 25 dB noise, the prediction error increased only slightly to 9.88×10−3 and 2.5×10−2. This study provides a practical example for achieving stable PINN training in multi-physics coupled problems.