Javascript must be enabled to continue!
Hybrid FEM–PINN Framework for 2D Shallow-Water Flow Simulation and Error Analysis
View through CrossRef
Abstract
Accurate and efficient simulation of shallow water dynamics remains one of the most challenging tasks in computational hydraulics due to the inherent trade-off between physical conservation and numerical stability. Conventional finite element methods (FEM) are known for their strong adherence to conservation principles, particularly mass balance, yet they frequently suffer from excessive diffusion, oscillations, and limited adaptability when dealing with highly nonlinear or data-sparse environments. In contrast, physics-informed neural networks (PINNs) have emerged as powerful tools that embed governing equations into the training of deep learning models, thereby providing smooth, data-driven solutions even in the absence of dense measurements. However, the standalone application of PINNs is restricted by weak enforcement of physical invariants, accumulation of errors over long-time horizons, and difficulties in achieving robust convergence. This methodological gap highlights the urgent need for a hybrid framework that can combine the complementary strengths of FEM and PINNs. The present study introduces an innovative hybrid FEM+PINN framework designed to close this gap. FEM is first employed to generate high-fidelity snapshots of the shallow water system, which serve as structured training data to guide the PINN component. The PINN simultaneously incorporates the shallow water governing equations, conservation constraints, and boundary conditions, ensuring that physical laws are respected during learning. By merging the conservation properties of FEM with the flexibility and adaptivity of PINNs, the proposed model achieves a balance between accuracy, robustness, and generalization. The training strategy further implements collocation sampling, gradient clipping, and dynamic weighting of data and PDE losses to enhance stability across epochs. The results confirm the clear advantages of the hybrid approach. Quantitatively, the water depth h achieves a root mean square error (RMSE) of 0.0461 and mean absolute error (MAE) of 0.0403, while the momentum components hu and hv exhibit RMSE values of 0.1265 and 0.1, respectively. Mass conservation is preserved with deviations limited to 3.55%, whereas energy conservation, although not exact, demonstrates controlled systematic accumulation rather than instability. The training loss decreases rapidly from an initial value of 6.0×105 to below 2.0×104 within 60 epochs, confirming convergence without oscillatory artifacts. Spatial error distributions remain smooth and symmetric, error histograms demonstrate strong clustering near zero, and flow field visualizations highlight coherent structures without noise. This study fills a crucial methodological gap by demonstrating that neither FEM nor PINNs alone can fully meet the requirements of accuracy, conservation, and stability in shallow water modeling. The hybrid FEM+PINN framework provides a novel, physically consistent, and computationally efficient solution. Its ability to integrate classical numerical rigor with machine learning adaptability marks a significant advancement for data-driven hydraulics and paves the way for next-generation models in environmental and engineering fluid dynamics.
Title: Hybrid FEM–PINN Framework for 2D Shallow-Water Flow Simulation and Error Analysis
Description:
Abstract
Accurate and efficient simulation of shallow water dynamics remains one of the most challenging tasks in computational hydraulics due to the inherent trade-off between physical conservation and numerical stability.
Conventional finite element methods (FEM) are known for their strong adherence to conservation principles, particularly mass balance, yet they frequently suffer from excessive diffusion, oscillations, and limited adaptability when dealing with highly nonlinear or data-sparse environments.
In contrast, physics-informed neural networks (PINNs) have emerged as powerful tools that embed governing equations into the training of deep learning models, thereby providing smooth, data-driven solutions even in the absence of dense measurements.
However, the standalone application of PINNs is restricted by weak enforcement of physical invariants, accumulation of errors over long-time horizons, and difficulties in achieving robust convergence.
This methodological gap highlights the urgent need for a hybrid framework that can combine the complementary strengths of FEM and PINNs.
The present study introduces an innovative hybrid FEM+PINN framework designed to close this gap.
FEM is first employed to generate high-fidelity snapshots of the shallow water system, which serve as structured training data to guide the PINN component.
The PINN simultaneously incorporates the shallow water governing equations, conservation constraints, and boundary conditions, ensuring that physical laws are respected during learning.
By merging the conservation properties of FEM with the flexibility and adaptivity of PINNs, the proposed model achieves a balance between accuracy, robustness, and generalization.
The training strategy further implements collocation sampling, gradient clipping, and dynamic weighting of data and PDE losses to enhance stability across epochs.
The results confirm the clear advantages of the hybrid approach.
Quantitatively, the water depth h achieves a root mean square error (RMSE) of 0.
0461 and mean absolute error (MAE) of 0.
0403, while the momentum components hu and hv exhibit RMSE values of 0.
1265 and 0.
1, respectively.
Mass conservation is preserved with deviations limited to 3.
55%, whereas energy conservation, although not exact, demonstrates controlled systematic accumulation rather than instability.
The training loss decreases rapidly from an initial value of 6.
0×105 to below 2.
0×104 within 60 epochs, confirming convergence without oscillatory artifacts.
Spatial error distributions remain smooth and symmetric, error histograms demonstrate strong clustering near zero, and flow field visualizations highlight coherent structures without noise.
This study fills a crucial methodological gap by demonstrating that neither FEM nor PINNs alone can fully meet the requirements of accuracy, conservation, and stability in shallow water modeling.
The hybrid FEM+PINN framework provides a novel, physically consistent, and computationally efficient solution.
Its ability to integrate classical numerical rigor with machine learning adaptability marks a significant advancement for data-driven hydraulics and paves the way for next-generation models in environmental and engineering fluid dynamics.
Related Results
Potable Water Sources, Household Hygiene, and Sanitation Practices in Ikpoba Okha LGA, Edo State: Implications for Public Health and Sustainable Water Management
Omoregie, Andrew Edosa.1 Omoregie Abieyuwa Peace2 Okoro, Enyinnaya Okoro.3
1 College of Medi
Potable Water Sources, Household Hygiene, and Sanitation Practices in Ikpoba Okha LGA, Edo State: Implications for Public Health and Sustainable Water Management
Omoregie, Andrew Edosa.1 Omoregie Abieyuwa Peace2 Okoro, Enyinnaya Okoro.3
1 College of Medi
BACKGROUND
Access to potable drinking water and sufficient sanitation continues to be an urgent global concern, particularly in developing regions where con...
Machine learning for numerical processing and analysis of kinetic and fluid simulations of fusion plasmas
Machine learning for numerical processing and analysis of kinetic and fluid simulations of fusion plasmas
Intelligence artificielle pour le traitement numérique et l'analyse de simulations cinétiques et fluides de plasmas de fusion
L'étude des plasmas de fusion magnétiq...
On Smoothed Finite Element Methods
On Smoothed Finite Element Methods
The paper presents an overview of the smoothed finite element methods (S-FEM) which are formulated by combining the existing standard FEM with the strain smoothing techniques used ...
Artificial Neural Networks Solutions for Solving Differential Equations: A Focus and Example for Flow of Viscoelastic Fluid with Microrotation
Artificial Neural Networks Solutions for Solving Differential Equations: A Focus and Example for Flow of Viscoelastic Fluid with Microrotation
Physics-informed neural networks (PINN) are an artificial neural network (ANN) approach for solving differential equations. PINN offers an alternative to classical numerical method...
Integrated hydrological modelling for sustainable water allocation planning : Mkomazi Basin, South Africa case study
Integrated hydrological modelling for sustainable water allocation planning : Mkomazi Basin, South Africa case study
Allocation of freshwater resources between societal needs and natural ecological systems is of great concern for water managers. This development has challenged decision-makers reg...
Coastal karst springs in the Mediterranean basin : study of the mechanisms of saline pollution at the Almyros spring (Crete), observations and modelling
Coastal karst springs in the Mediterranean basin : study of the mechanisms of saline pollution at the Almyros spring (Crete), observations and modelling
Abstract
Variations in salinity and flow rate in the aerial, naturally salty spring of Almyros of Heraklion on Crete were monitored during two hydrological cycles. W...
Spatially-distributed parameter identification by physics-informed neural networks illustrated on the 2D shallow-water equations
Spatially-distributed parameter identification by physics-informed neural networks illustrated on the 2D shallow-water equations
Abstract
Recent advancements in Physics-Informed Neural Networks (PINNs) offer promising opportunities for the identification of parameters of physical models based ...
On physics-informed neural networks for quantum computers
On physics-informed neural networks for quantum computers
Physics-Informed Neural Networks (PINN) emerged as a powerful tool for solving scientific computing problems, ranging from the solution of Partial Differential Equations to data as...

