Table of Contents
Fetching ...

Scientific Machine Learning of Flow Resistance Using Universal Shallow Water Equations with Differentiable Programming

Xiaofeng Liu, Yalan Song

TL;DR

The paper tackles the challenge of uncertain flow resistance in open-channel hydraulics by developing differentiable Universal Shallow Water Equations (USWEs) within the Hydrograd framework, enabling gradient-based inversion and physics discovery. It integrates neural networks with a 2D SWE solver in a universal differential equation (UDE) setting, allowing the NN to learn flow resistance either as a function of depth, velocity, and roughness height or to replace entire resistance terms while preserving physics. The authors demonstrate forward validation, sensitivity analysis, and inverse Manning's $n$ inversion in a real river, and show two physics-discovery cases where the NN learns universal relationships $n(h)$ and $n(h,U_{mag},k_s)$, with results consistent with established friction laws. This differentiable hydrodynamics approach provides a pathway for data-driven discovery of flow-resistance physics and improved, adaptable hydraulic modeling in complex, real-world contexts.

Abstract

Shallow water equations (SWEs) are the backbone of most hydrodynamics models for flood prediction, river engineering, and many other water resources applications. The estimation of flow resistance, i.e., the Manning's roughness coefficient $n$, is crucial for ensuring model accuracy, and has been previously determined using empirical formulas or tables. To better account for temporal and spatial variability in channel roughness, inverse modeling of $n$ using observed flow data is more reliable and adaptable; however, it is challenging when using traditional SWE solvers. Based on the concept of universal differential equation (UDE), which combines physics-based differential equations with neural networks (NNs), we developed a universal SWEs (USWEs) solver, Hydrograd, for hybrid hydrodynamics modeling. It can do accurate forward simulations, support automatic differentiation (AD) for gradient-based sensitivity analysis and parameter inversion, and perform scientific machine learning for physics discovery. In this work, we first validated the accuracy of its forward modeling, then applied a real-world case to demonstrate the ability of USWEs to capture model sensitivity (gradients) and perform inverse modeling of Manning's $n$. Furthermore, we used a NN to learn a universal relationship between $n$, hydraulic parameters, and flow in a real river channel. Unlike inverse modeling using surrogate models, Hydrograd uses a two-dimensional SWEs solver as its physics backbone, which eliminates the need for data-intensive pretraining and resolves the generalization problem when applied to out-of-sample scenarios. This differentiable modeling approach, with seamless integration with NNs, provides a new pathway for solving complex inverse problems and discovering new physics in hydrodynamics.

Scientific Machine Learning of Flow Resistance Using Universal Shallow Water Equations with Differentiable Programming

TL;DR

The paper tackles the challenge of uncertain flow resistance in open-channel hydraulics by developing differentiable Universal Shallow Water Equations (USWEs) within the Hydrograd framework, enabling gradient-based inversion and physics discovery. It integrates neural networks with a 2D SWE solver in a universal differential equation (UDE) setting, allowing the NN to learn flow resistance either as a function of depth, velocity, and roughness height or to replace entire resistance terms while preserving physics. The authors demonstrate forward validation, sensitivity analysis, and inverse Manning's inversion in a real river, and show two physics-discovery cases where the NN learns universal relationships and , with results consistent with established friction laws. This differentiable hydrodynamics approach provides a pathway for data-driven discovery of flow-resistance physics and improved, adaptable hydraulic modeling in complex, real-world contexts.

Abstract

Shallow water equations (SWEs) are the backbone of most hydrodynamics models for flood prediction, river engineering, and many other water resources applications. The estimation of flow resistance, i.e., the Manning's roughness coefficient , is crucial for ensuring model accuracy, and has been previously determined using empirical formulas or tables. To better account for temporal and spatial variability in channel roughness, inverse modeling of using observed flow data is more reliable and adaptable; however, it is challenging when using traditional SWE solvers. Based on the concept of universal differential equation (UDE), which combines physics-based differential equations with neural networks (NNs), we developed a universal SWEs (USWEs) solver, Hydrograd, for hybrid hydrodynamics modeling. It can do accurate forward simulations, support automatic differentiation (AD) for gradient-based sensitivity analysis and parameter inversion, and perform scientific machine learning for physics discovery. In this work, we first validated the accuracy of its forward modeling, then applied a real-world case to demonstrate the ability of USWEs to capture model sensitivity (gradients) and perform inverse modeling of Manning's . Furthermore, we used a NN to learn a universal relationship between , hydraulic parameters, and flow in a real river channel. Unlike inverse modeling using surrogate models, Hydrograd uses a two-dimensional SWEs solver as its physics backbone, which eliminates the need for data-intensive pretraining and resolves the generalization problem when applied to out-of-sample scenarios. This differentiable modeling approach, with seamless integration with NNs, provides a new pathway for solving complex inverse problems and discovering new physics in hydrodynamics.

Paper Structure

This paper contains 18 sections, 13 equations, 13 figures.

Figures (13)

  • Figure 1: The code structure of Hydrograd.
  • Figure 2: The schematic diagram of the shallow flow and definitions: (a) the definitions of the variables; (b) the scheme of the universal shallow water equations (USWEs).
  • Figure 3: The comparison of the forward simulation results of the 1D channel with a bump.
  • Figure 4: The forward simulation results of the Savannah River case: (a) Bathymetry, (b) Five zones of Manning's $n$, (c) Simulated WSE, (d) Simulated flow velocity.
  • Figure 5: The sensitivity analysis of the Savannah River case. Each subplot shows the sensitivity of the flow variables ($WSE$, $hu$, $hv$) to the Manning's $n$ in different zones. Each column is for a flow variable and each row is for a roughness zone.
  • ...and 8 more figures