Hydrograd v2.0: a differentiable two-dimensional shallow-water model on unstructured meshes with steady and unsteady adjoints for calibration and closure learning
Abstract
We present \textit{Hydrograd} v2.0, a significantly improved differentiable 2D shallow-water model written in Python with JAX. The model solves the shallow-water equations on the unstructured meshes of production models such as SRH-2D and HEC-RAS 2D with a well-balanced, positivity-preserving finite-volume scheme that handles wetting and drying. Gradients are tailored to the type of problem. Steady states are found by Newton's method with an exact sparse Jacobian obtained by graph colouring, and their gradients follow from the implicit function theorem at the cost of one linear solve. Unsteady flows are differentiated in reverse mode with checkpointing, or with an implicit time integrator whose gradient costs about two forward runs. All gradients agree with finite differences, to about for steady flows. On the Savannah River case, the steady water surface differs from that of SRH-2D by 4.7\,mm (root mean square). Steady closure learning was 96 times faster than differentiating through time marching and reached a lower loss. An inflow hydrograph was inverted from stage records with a peak error of 2\,\%. In an unsteady roughness calibration, a singular value decomposition analysis of the sensitivity matrix showed that the stage records at the gauges are 70 to 160 times more sensitive to the total resistance of the reach than to its distribution among the roughness zones, which explains why only a gauge layout with gauges in every zone recovered all five roughness values. On one GPU, a mesh of 512,000 cells takes 7.6\,s for a forward run and 51\,s for a gradient.
Create a lesson
Related papers
Shallow water equations on n-dimensional Riemannian manifolds: a kinetic approach
Shared title terminology · Gerardo Hernández-Dueñas
A multi-fidelity dataset of two-dimensional steady laminar channel flow around obstacles
Shared title terminology · Alper Saydam, Barış Akgün
Hamiltonian symmetry behind the vanishing of four-wave interactions at non-trivial resonances for one-dimensional deep-water waves
Shared title terminology · Päivo Simson
Experimental and numerical simulations of near resonant 2D soliton interaction in shallow water
Shared title terminology · Thibault Leduque, Fred Couderc, Maxime Kaczmarek et al.
Variational Newton-Krylov descent for periodic orbits of two-dimensional Kolmogorov flow
Shared title terminology · Davide Lasagna, Thomas Burton
Boundary-layer detachment and infinite-Reynolds limit of two-dimensional wall-bounded flows
Shared title terminology · Ciro S. Campolina, Jérémie Bec