An Improved PINN Algorithm for Shallow Water Equations Driven by Deep Learning
Abstract
:1. Introduction
2. Shallow Water Equations
3. Methods
3.1. Classical PINN Algorithm
3.2. LSTM
3.3. Attention Mechanism
3.4. Improved Algorithm
Regularization Term
4. Results
5. Discussion
- Sparse Wave Capturing Ability: In the simulation experiments of the one-dimensional shallow water equation, we observed that the improved PINN algorithm shows significant advantages in handling discontinuous problems such as sparse waves and shock waves. This is mainly due to the integration of the LSTM network model, regularization, and the self-attention mechanism. This combination enhances the model’s ability to handle partial differential equations involving time-series data and improves the model’s generalization capabilities, thereby increasing its ability to identify and manage discontinuities.
- Avoiding Smoothing Effects: The traditional PINN algorithm often exhibits solution smoothing when handling discontinuous problems. However, the improved algorithm in this study successfully avoids this issue, which can likely be attributed to the introduction of the regularization term. This enhances the model’s ability to capture fine details, allowing for a more accurate simulation of real-world physical phenomena.
- 3.
- Symmetry and Numerical Stability: In the handling of the two-dimensional shallow water equation, the improved PINN algorithm demonstrated good symmetry and reduced non-physical oscillations, which is crucial for maintaining numerical stability. This finding highlights the potential and applicability of the improved algorithm in solving more complex and higher-dimensional problems. The reduction in non-physical oscillations showcases the superiority of the improved algorithm in numerical simulations. This characteristic is especially important for engineering applications, as it provides more reliable predictions, helping to avoid erroneous decisions based on inaccurate simulations.
- 4.
- Shock Wave Handling and High Resolution: In two-dimensional problems, shock waves are a crucial phenomenon in shallow water equations, and numerical simulations must accurately capture the propagation and interaction of shock waves. In the improved algorithm, we observe that the contour lines are denser and more complex, with a significantly narrower shock wave filtering zone, while still maintaining physical accuracy and numerical stability. This indicates that the improved algorithm offers more refined simulation results, better reproducing the details and characteristics of shock waves in fluid dynamics. The high-resolution performance of this algorithm demonstrates its ability to capture subtle physical changes, which is critical for accurately simulating and predicting hydrodynamic phenomena.
- 5.
- In this study, under the same RTX 4090 GPU environment, during 10,000 iterations, we observed that in the one-dimensional problem, the running time for the classical PINN was 253 s, while the running time for the improved PINN was 432 s. In the two-dimensional problem, the classical PINN took 568 s to run, whereas the improved PINN took 1987 s. This result indicates that while the introduction of LSTM and attention mechanisms enhances the model’s performance, it also significantly increases the computational burden. Considering the significant advantages of the proposed improved PINN algorithm in handling one-dimensional and two-dimensional shallow water equations, particularly in accurately capturing complex flow phenomena in later stages, the improved algorithm is better suited for applications requiring precise details and complex flow simulations. In contrast, the classical PINN is more appropriate for predicting and analyzing overall trends, especially in scenarios where detail is not as critical. Future work could further explore how this algorithm can be applied to real fluid dynamics problems, such as flood simulations and coastal engineering, and encourage collaboration with practical fields to validate the algorithm’s effectiveness and potential impact.
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Kurganov, A. Finite-volume schemes for shallow-water equations. Acta Numer. 2018, 27, 289–351. [Google Scholar] [CrossRef]
- Dorodnitsyn, V.A.; Kaptsov, E.I. Discrete shallow water equations preserving symmetries and conservation laws. J. Math. Phys. 2021, 62, 083508. [Google Scholar] [CrossRef]
- Noelle, S.; Pankratz, N.; Puppo, G.; Natvig, J.R. Well-balanced finite volume schemes of arbitrary order of accuracy for shallow water flows. J. Comput. Phys. 2006, 213, 474–499. [Google Scholar] [CrossRef]
- Shamkhalchian, A.; De Almeida, G.A.M. Upscaling the shallow water equations for fast flood modelling. J. Hydraul. Res. 2020, 59, 739–756. [Google Scholar] [CrossRef]
- Valseth, E.; Dawson, C. A stable space-time FE method for the shallow water equations. Comput. Geosci. 2022, 26, 53–70. [Google Scholar] [CrossRef]
- Zhang, J.; Han, R.; Ni, G. High-order curvilinear Lagrangian finite element methods for shallow water hydrodynamics. Int. J. Numer. Methods Fluids 2023, 95, 1846–1869. [Google Scholar] [CrossRef]
- Cao, L. Deep Learning Applications. IEEE Intell. Syst. 2022, 37, 3–5. [Google Scholar] [CrossRef]
- Taflove, A.; Hagness, S.C.; Piket-May, M. Computational Electromagnetics: The Finite-Difference Time-Domain Method. In The Electrical Engineering Handbook; Elsevier: Amsterdam, The Netherlands, 2005; pp. 629–670. [Google Scholar]
- Temam, R. Navier Stokes Equations: Theory and Numerical Analysis. J. Appl. Mech. 1978, 45, 456. [Google Scholar] [CrossRef]
- Ames, W.F. Numerical Methods for Partial Differential Equations; Academic Press: Cambridge, MA, USA, 2014. [Google Scholar]
- Raissi, M.; Perdikaris, P.; Karniadakis, G.E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 2019, 378, 686–707. [Google Scholar] [CrossRef]
- Cha, W.; Li, D.; Shen, L.; Liu, X. A review of solving methods of partial differential equations based on neural networks. Chin. J. Theor. Appl. Mech. 2022, 54, 543–556. [Google Scholar]
- Li, Y.; Chen, S. Neural Networks Based on Physical Information: Recent Advances and Prospects. J. Comput. Phys. 2022, 49, 254–262. [Google Scholar]
- Sirignano, J.; Spiliopoulos, K. DGM: A deep learning algorithm for solving partial differential equations. J. Comput. Phys. 2018, 375, 1339–1364. [Google Scholar] [CrossRef]
- Mao, Z.; Jagtap, A.D.; Karniadakis, G.E. Physics-informed neural networks for high-speed flows. Comput. Methods Appl. Mech. Eng. 2020, 360, 112789. [Google Scholar] [CrossRef]
- Minbashian, H.; Giesselmann, J. Deep Learning for Hyperbolic Conservation Laws with Non-convex Flux. Proc. Appl. Math. Mech. 2021, 20, e202000347. [Google Scholar] [CrossRef]
- Jagtap, A.D.; Kharazmi, E.; Karniadakis, G.E. Conservative physics-informed neural networks on discrete domains for conservation laws: Applications to forward and inverse problems. Comput. Methods Appl. Mech. Eng. 2020, 365, 113028. [Google Scholar] [CrossRef]
- Lu, L.; Meng, X.; Mao, Z.; Karniadakis, G.E. DeepXDE: A Deep Learning Library for Solving Differential Equations. SIAM Rev. 2021, 63, 208–228. [Google Scholar] [CrossRef]
- Liu, Y.; Wen, L.; Yan, X.; Guo, S.; Zhang, C.-A. Adaptive transfer learning for PINN. J. Comput. Phys. 2023, 490, 112291. [Google Scholar] [CrossRef]
- Cho, G.; Zhu, D.; Campbell, J.J.; Wang, M. An LSTM-PINN Hybrid Method to Estimate Lithium-Ion Battery Pack Temperature. IEEE Access 2022, 10, 100594–100604. [Google Scholar] [CrossRef]
- Xu, H.; Zhang, D. Robust discovery of partial differential equations in complex situations. Phys. Rev. Res. 2021, 3, 033270. [Google Scholar] [CrossRef]
- Liangliang, Y.; You, Z.; Liu, H.; Laijun, L. An improved method for Physics-Informed Neural Networks that accelerates convergence. IEEE Access 2024, 12, 23943–23953. [Google Scholar]
- Zheng, S.; Lin, Y.; Feng, J.; Jin, F. Viscous Regularization of the Shallow Water Wave Equation through PINN Algorithm. J. Comput. Phys. 2023, 40, 314–324. [Google Scholar]
- Jin, F.; Zheng, S.; Feng, J.; Lin, Y. Parallel physics-informed neural network algorithm for solving shallow water wave equations. Chin. J. Comput. Mech. 2024, 352–358. [Google Scholar]
- Psaros, A.F.; Kawaguchi, K.; Karniadakis, G.E. Meta-learning PINN loss functions. J. Comput. Phys. 2022, 458, 111121. [Google Scholar] [CrossRef]
- Liu, X.; Zhang, X.; Peng, W.; Zhou, W.; Yao, W. A novel meta-learning initialization method for physics-informed neural networks. Neural Comput. Appl. 2022, 34, 14511–14534. [Google Scholar] [CrossRef]
- Yunyun, L.; Zheng, S.; Feng, J.; Fang, J. Diffusive Regularization Inverse PINN Solutions to Discontinuous Problems. Appl. Math. Mech. 2023, 44, 112–122. [Google Scholar] [CrossRef]
- Sepp, H.; Jürgen, S. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar]
- Atif, K.; Abrar, A.; Salman, J.; Muhammad, B.; Megat, F.Z. Abusive Language Detection in Urdu Text: Leveraging Deep Learning and Attention Mechanism. IEEE Access 2024, 12, 37418–37431. [Google Scholar]
- Ren, P.; Rao, C.; Liu, Y.; Wang, J.; Sun, H. PhyCRNet: Physics-informed convolutional-recurrent network for solving spatiotemporal PDEs. Comput. Methods Appl. Mech. Eng. 2022, 389, 114399. [Google Scholar] [CrossRef]
- Zhang, R.; Liu, Y.; Sun, H. Physics-informed multi-LSTM networks for metamodeling of nonlinear structures. Comput. Methods Appl. Mech. Eng. 2020, 369, 113226. [Google Scholar] [CrossRef]
- Hinton, G.E.; Srivastava, N.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Improving neural networks by preventing co-adaptation of feature detectors. arXiv 2012, arXiv:1207.0580. [Google Scholar]
- Moradi, R.; Berangi, R.; Minaei, B. A survey of regularization strategies for deep models. Artif. Intell. Rev. 2019, 53, 3947–3986. [Google Scholar] [CrossRef]
- Sarah, F.; Andreas, G.; Katja, I.; Thomas, K.; Markus, P.; Jörg, R.; Tim, F. Regularization approaches in clinical biostatistics: A review of methods and their applications. Stat. Methods Med. Res. 2022, 32, 425–440. [Google Scholar]
Time | 0.08 | 0.12 | 0.16 |
---|---|---|---|
Classical PINN | 0.0503 | 0.0449 | 0.0382 |
Improved PINN | 0.0336 | 0.0318 | 0.0312 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, Y.; Sun, Q.; Wei, J.; Huang, C. An Improved PINN Algorithm for Shallow Water Equations Driven by Deep Learning. Symmetry 2024, 16, 1376. https://doi.org/10.3390/sym16101376
Li Y, Sun Q, Wei J, Huang C. An Improved PINN Algorithm for Shallow Water Equations Driven by Deep Learning. Symmetry. 2024; 16(10):1376. https://doi.org/10.3390/sym16101376
Chicago/Turabian StyleLi, Yanling, Qianxing Sun, Junfang Wei, and Chunyan Huang. 2024. "An Improved PINN Algorithm for Shallow Water Equations Driven by Deep Learning" Symmetry 16, no. 10: 1376. https://doi.org/10.3390/sym16101376
APA StyleLi, Y., Sun, Q., Wei, J., & Huang, C. (2024). An Improved PINN Algorithm for Shallow Water Equations Driven by Deep Learning. Symmetry, 16(10), 1376. https://doi.org/10.3390/sym16101376