CS Paper Radar

Hydrograd v2.0: a differentiable two-dimensional shallow-water model on unstructured meshes with steady and unsteady adjoints for calibration and closure learning

Xiaofeng Liu

cs.CE physics.flu-dynphysics.comp-ph ·submitted 2026-11-08 18:28 UTC · v1
theory

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 $10^{-8}$ 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.

Closest papers

Nearest neighbours by meaning across the whole index.

Water-network decisions share one hydraulic gradient, and it can now be computed exactly

cs.DC ·2026-09-06 ·Tianwei Mu, Yue Wang, Mingzhe Yuan, Wenhong Wang, Qing Luo +4 more
benchmarkcode/data similarity 0.60
Abstract · 56 pages including Supplementary Information; 6 figures, 2 tables, 1 supplementary figure, 16 supplementary tables. Code and data: https://g…

Calibration, leak localisation and sensor placement on water distribution networks (WDNs) are decisions about continuous parameters, yet the hydraulic engine that defines the physics returns a solution and no derivatives, so practice falls back on derivative-free search or on surrogates whose error the answer inherits. We make the global gradient algorithm itself exactly differentiable: the forward pass reproduces the reference engine's discrete devices, status switching and low-flow linearisation included, and the backward pass solves the implicit adjoint by reusing the forward pass's terminal factorisation, so one extra sparse solve returns every parameter's gradient at once, batched over scenarios on one graphics processor. Across 52 public, synthetic and operational networks and 8,140 simulation frames, every network meets the acceptance criterion, the largest head deviation from EPANET 2.2 is 1.137e-13 ft and 25 agree exactly. One adjoint solve replaces the 906 simulations a finite-difference roughness Jacobian costs on the 905-pipe L-TOWN benchmark, and a leak-inversion training loop runs at 463-470 ms per optimiser step for 256 scenarios, 191 times the prior pipeline. Gradient calibration reaches its endpoint within a median 595 model calls, where the strongest of five tuned metaheuristics needs 8,060 to match it on the training loss and two never do within 20,000. On a 554-link operating network, one adjoint pass audits, pipe by pipe, which roughness parameters the installed sensors can constrain and which sensors to add, on the model the utility already operates.

0.38

Solving the Discretised Shallow Water Equations on Distorted Structured Grids with Neural Physics

cs.CE physics.comp-phphysics.flu-dyn ·2026-11-15 ·Boyang Chen, Claire E. Heaney, Christopher C. Pain
similarity 0.57
Abstract · 43 pages, 12 figures, 2 tables

This paper presents a method for solving the shallow water equations on highly distorted structured grids using convolution-based operators following the Neural Physics approach. By mapping distorted physical grids to a uniform computational domain with Jacobian transformations, the governing advection and diffusion operators are reformulated in a structured convolutional form. This enables the use of efficient stencil-based operations and, following the Neural Physics concept, we do this through convolutional layers whose weights are determined by the chosen numerical methods rather than by training. The method introduces consistent mass-lumped formulations, conservative and non-conservative advection forms, and a diffusion operator, all expressed as convolutions. A nonlinear Petrov-Galerkin stabilisation is incorporated to control numerical oscillations on distorted meshes. Two approximations for the Laplacian operator are also proposed to accelerate pressure and diffusion solves. The framework is validated using the Carlisle 2005 flood event, demonstrating accurate predictions of water depth and velocity on distorted meshes for both linear and quadratic discretisations. The results show that distorted structured grids can retain conservation, stability and accuracy, whilst adapting the mesh statically. The convolutional formulation makes the method well suited to Neural Physics implementations and GPU acceleration, offering a scalable approach for flood modelling and large-scale geophysical simulations.

0.37

CraftSPH: A composable framework for differentiable smoothed particle hydrodynamics implemented in PyTorch

cs.LG physics.flu-dynmath.NA ·2026-09-24 ·Gen Matono, Shujiro Fujioka, Mayuko Nishio
code/data similarity 0.57
Abstract · The code is publicly available at https://github.com/GenMNL/CraftSPH 43 pages, 14 figures

Smoothed particle hydrodynamics (SPH) is well suited to large-deformation fluid problems, and the growing use of automatic differentiation in engineering applications has motivated interest in differentiable SPH solvers. In this study, a composable differentiable SPH framework, CraftSPH, has been developed. In CraftSPH, major computational operations are implemented as independent modules that users can combine to construct solvers for different purposes. This design supports high-accuracy discretization and both explicit and implicit computation within a common framework, while allowing individual components to be maintained and extended. Selected numerical operations also support automatic differentiation (AD) for physical-parameter estimation and potential coupling with deep learning models. These capabilities were demonstrated through forward and inverse analyses. Forward analyses using an implicit SPH scheme with high-accuracy discretization showed good agreement with analytical and reference solutions for Poiseuille flow and a rising bubble, while capturing the key experimental trends in two- and three-dimensional dam-break problems. In inverse analyses, explicit and implicit SPH schemes were used to estimate kinematic viscosity in Taylor-Green vortex flow and Reynolds number in lid-driven cavity flow. The results also showed that the choice of operations included in the computational graph affects the computed gradients. Together, these findings demonstrate that CraftSPH enables users to assemble problem-specific solvers for forward and inverse analyses within a common framework.

0.47

Rigorously Certified Neural-Network Computation of Nonlinear Water Waves at Near-Machine Precision

cs.LG math.APphysics.flu-dyn ·2026-11-05 ·Michal Shavit, Yongji Wang, Tristan Buckmaster
theory similarity 0.54
Abstract · 29 pages, 6 figures

We present a computational framework that combines machine-learning-based discovery with rigorous computer-assisted numerical certification and formal verification for strongly nonlinear partial differential equations. We demonstrate the approach for periodic gravity-capillary traveling water waves. Physics-informed neural networks are used as a search mechanism, with the wave profile, wave speed and, in continuation experiments, surface tension learned directly from the governing equations without training data. Through a staged training and refinement procedure, the neural networks achieve near-machine-precision residuals of the governing equations, even in strongly nonlinear regimes. A single formulation recovers high-amplitude Stokes waves, Crapper waves and Wilton ripples. Continuation from a high-amplitude Wilton ripple in surface tension reveals new high-amplitude candidate solutions. We freeze one candidate as an explicit finite representation and rigorously certify a uniform bound on its governing-equation residual using interval arithmetic, accounting for floating-point roundoff, Fourier truncation, aliasing and grid-to-continuum errors. This independently validates the neural-network accuracy. We formalize the certification argument in Lean, which machine-checks the deductions from certified numerical bounds to the residual theorem. Both the interval certification and formalization were developed with substantial assistance from a large language model, while the validity of the result remains independent of the language model: the numerical bounds are rigorously enclosed by interval arithmetic and the subsequent mathematical deductions are checked by the Lean kernel. Together, these steps provide a pipeline from neural discovery to rigorous numerical certification and machine-checked verification with auditable mathematical guarantees.

0.28

An Adaptive-Horizon Graph Neural Operator for coupled surrogate morphodynamic modelling

cs.LG physics.comp-ph ·2026-10-15 ·Ying Cao, Yifan Yang, Junqiang Xia, Julia C. Mullarney, Mário J. Franca
similarity 0.54
Abstract · 28 pages, 13 figures, 1 table

Morphodynamic simulations require repeated coupling between hydrodynamic solvers, sediment transport modules, and bed updating. For long duration, multi-scenario simulations on large unstructured meshes, such coupling is computationally demanding. This study proposes an Adaptive-Horizon Graph Neural Operator (AH-GNO) that formulates bed evolution as a graph operator learning problem from recent hydrodynamic and topographic states to predict future bed elevation increments. The model operates directly on the native unstructured meshes. The approach integrates area-weighted graph learning, historical state selection, and forecast horizon estimation, allowing the effective history length (K) and update interval (B) to vary with the evolving flow and bed state. Using Telemac2D/GAIA solutions as supervised numerical references, the framework is evaluated on the official Bump and Yen bend benchmarks and on a field-scale application (Waiho River, New Zealand). Results show that the AH-GNO reproduces the main patterns of bedform migration, bend-scale erosion and deposition, and localized bed adjustment. Across the three cases, the tested CPU-GPU deployment reduced post-training bed-update workflow time from 12~1204 s with GAIA to 0.08~3.34 s with AH-GNO. This improvement corresponds to deployment-specific accelerations of approximately 150~360 times relative to 4-core GAIA CPU configurations, and with 105~186 times gains for 20-core CPU configurations. These results suggest that, while retaining hydrodynamic feedback from TELEMAC-2D, a learned operator for bed updating can provide an efficient acceleration component for morphodynamic scenario analysis and rapid coupled simulation.

0.24

Hamiltonian Two-Way Coupling of Nonlinear Waves and 3D Flows

cs.GR math.NAphysics.flu-dyn ·2026-08-25 ·Sinan Wang, Ruicheng Wang, Taiyuan Zhang, Fan Feng, Jinjin He +3 more
top venue similarity 0.53
Abstract · To appear in ACM Transactions on Graphics (SIGGRAPH Asia 2026)

Simulating large-scale free-surface water by coupling a localized 3D fluid solver to a cheaper 2D surface model has long faced a mismatch in wave dynamics: efficient 2D wave models used in graphics are typically either linear or non-dispersive. These models are fast, simple, and accurate for calm, small-amplitude seas, but coupling them with strongly nonlinear 3D solvers produces visible reflections and artifacts at the 2D--3D interface. We address this problem by introducing a nonlinear and dispersive 2D wave model based on the canonical Zakharov formulation. Its Hamiltonian structure, in which the surface elevation and surface potential form a canonical pair ($η$, $ψ$) governed by the wave energy, enables a canonically consistent two-way coupling scheme, allowing information to pass smoothly across the 2D--3D interface. Our 2D solver reduces mean wave-height error by 1.7--5$\times$ over SWE, BEM, and Airy baselines while running more than $10^3\times$ faster than BEM; it achieves greater nonlinear accuracy and coupling fidelity than SWE and Airy, with minor losses in speed and stability. Coupling it with a 3D Navier--Stokes solver yields a full system that suppresses visible seam artifacts across a range of experiments, including dispersion-matching and Kelvin-wake tests, and runs over 4$\times$ faster than a pure GPU NB-FLIP simulation on the same domain.

0.41

Sensitivity-Constrained Neural Operators for Data-Efficient Forward and Inverse Modeling of Partial Differential Equation Systems

cs.LG ·2026-08-30 ·Abdolmehdi Behroozi, Chaopeng Shen, Daniel Kifer, Kathryn Lawson
similarity 0.52
Abstract

Neural operators provide fast surrogates for partial differential equation (PDE) solvers, but their reliability can degrade for high-dimensional spatial inputs and inverse or repeated inference. State-only training constrains solution values but not the learned input--output response. We study sensitivity-constrained neural operators (SC-NOs), which augment standard training with sampled solver-derived Jacobian supervision. Selected sensitivities from differentiable solvers or discrete adjoints are matched during training, allowing response information to be amortized across minibatches without imposing the full Jacobian at every update. We evaluate SC-NO on advection--diffusion and RANS--Spalart--Allmaras benchmarks, input-dimensionality scaling tests, long-horizon autoregressive rollout, and a shallow-water Tohoku tsunami source-inversion case. Sensitivity supervision improves forward prediction and yields larger gains in gradient-based inverse reconstruction of distributed fields. Scaling experiments show an improved accuracy--cost tradeoff for high-dimensional gridded inputs, while ablations indicate that state values and Jacobian information provide complementary supervision. In the tsunami case, SC-FNO reconstructs gridded seafloor deformation from sparse early gauge observations and forecasts subsequent wave propagation in a near-real-time proof-of-concept workflow. These results support sampled sensitivity supervision as a practical way to improve neural PDE surrogates when forward accuracy, inverse stability, robustness, and computational cost must be considered together.

0.39

Generalized hydraulic neural operators turbocharging sewer digital twins

cs.CE ·2026-11-13 ·Ruozhou Lin, Shixun Li, Tao Shi, Lihan Hu, Zhiyu Zhang +2 more
similarity 0.51
Abstract

Hydraulic digital twins are emerging as the next-generation paradigm for operating and managing sewer systems. Conventional hydraulic digital twinning relies on running physics-based models (e.g., Saint-Venant equations), which are computationally expensive and often too slow for real-time applications. Although surrogates (e.g., neural networks) can be fast, existing approaches are typically non-generalizable, requiring costly retraining for unseen pipes, networks, or flow conditions. Here, we develop a fast, generalized and differentiable multi-branch neural operator trained on solutions of the Saint-Venant equations that predicts in-pipe hydraulics. The learned operator reproduces complex hydraulic dynamics with high fidelity while achieving thousand- to million-fold speedups for online prediction, data assimilation, and diagnostics. Equally importantly, the learned operator generalizes to unseen pipes, networks, and flow conditions without retraining. These advances address key computational barriers to real-time sewer digital twins, opening new opportunities for more responsive flood-risk management and protection of urban water environments.

0.44