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
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 ...
Characterization of Oil-Water Two-phase Flow Patterns in Vertical Upward Flow Pipes Based on Fractal and Chaotic Time Series Analysis
Characterization of Oil-Water Two-phase Flow Patterns in Vertical Upward Flow Pipes Based on Fractal and Chaotic Time Series Analysis
Abstract
Characterization of oil-water two-phase flow patterns in vertical upward oil-water two-phase flow having an inner diameter 18mm are elucidated based on f...
Hybrid Finite Element–Smoothed Particle Hydrodynamics Modelling for Optimizing Cutting Parameters in CFRP Composites
Hybrid Finite Element–Smoothed Particle Hydrodynamics Modelling for Optimizing Cutting Parameters in CFRP Composites
Carbon-fibre-reinforced plastic (CFRP) is increasingly being used in various applications including aerospace, automotive, wind energy, sports, and robotics, which makes the precis...
Use of Formation Water and Associated Gases and their Simultaneous Utilization for Obtaining Microelement Concentrates Fresh Water and Drinking Water
Use of Formation Water and Associated Gases and their Simultaneous Utilization for Obtaining Microelement Concentrates Fresh Water and Drinking Water
Abstract Purpose: The invention relates to the oil industry, inorganic chemistry, in particular, to the methods of complex processing of formation water, using flare gas of oil and...
Grid Mirror: Harnessing Adversarial PINNs to Model Power Grid Dynamics
Grid Mirror: Harnessing Adversarial PINNs to Model Power Grid Dynamics
This paper presents a novel approach to estimate the dynamic behavior of power grids using Physics-Informed Neural Networks (PINNs) from an adversarial perspective. The methodology...
Physics-Informed Neural SOH Estimation Method for Lithium-ion Battery under Partial Observability and Sparse Sensor Data
Physics-Informed Neural SOH Estimation Method for Lithium-ion Battery under Partial Observability and Sparse Sensor Data
Abstract
Establishment of precise state-of-health (SOH) consists of a vital step to guarantee reliable, secure, and preventive maintenance of electric vehicle (EV) fleets a...
Pressure Analysis of DST Flow Period Or Slug Flow For Horizontal Wells In Homogeneous Reservoir
Pressure Analysis of DST Flow Period Or Slug Flow For Horizontal Wells In Homogeneous Reservoir
Abstract
By the transient pressure for horizontal well with constant flow rate and Duhamel's principle, this paper presents the method to calculate the transient ...
Multiphase Flow Metering:An Evaluation of Discharge Coefficients
Multiphase Flow Metering:An Evaluation of Discharge Coefficients
Abstract
The orifice discharge coefficient (CD) is the constant required to correct theoretical flow rate to actual flow rate. It is known that single phase orifi...

