Mathematical Background
This page outlines the mathematics underpinning ANUGA. It is a web-searchable version of Chapter 16 of the ANUGA User Manual. ANUGA has been applied to hydrodynamic modelling of coastal inundation [Nielsen2005] and many other shallow water problems.
Shallow Water Wave Equations
The shallow water wave equations are a system of differential conservation equations describing the flow of a thin layer of fluid over terrain:
The vector of conserved quantities is
where \(h\) is water depth, \(uh\) is momentum in the \(x\)-direction, and \(vh\) is momentum in the \(y\)-direction. Other quantities entering the system are bed elevation \(z\) and stage (absolute water level) \(w\), related by \(w = z + h\) at all times.
The flux vectors in the \(x\) and \(y\) directions are
and the source term (gravity and friction) is
where \(S_f\) is the bed friction modelled by Manning’s resistance law:
with \(\eta\) the Manning resistance coefficient. The model does not
include kinematic viscosity or dispersion (though Kinematic_viscosity_operator
can be added as an explicit operator).
Finite Volume Method
ANUGA uses a finite-volume method to solve the shallow water wave equations [ZR1999]. The study area is represented by a mesh of triangular cells; the conserved quantities \(h\), \(uh\), \(vh\) are stored at the centroid of each cell. The size of the triangles may vary to provide greater resolution in regions of particular interest.
Cell update equation
Integrating the conservation equations over triangular cell \(T_i\) and applying the divergence theorem gives the rate equation for the cell-averaged conserved quantities:
where
\(\mathbf{U}_i\) — conserved quantities averaged over cell \(i\)
\(A_i\) — area of cell \(i\)
\(\mathcal{N}_i\) — set of indices \(j\) of cells neighbouring cell \(i\)
\(l_{ij}\) — length of edge \(e_{ij}\) between cells \(i\) and \(j\)
\(\mathbf{H}_{ij}\,l_{ij}\) — outward normal flux across edge \(e_{ij}\)
\(\mathbf{S}_i\) — average source term over cell \(i\)
Reconstruction
A second-order piecewise-linear reconstruction of the conserved quantities is built within each cell from the cell-average values of that cell and its neighbours. The slope is limited (see Slope Limiting below) to suppress spurious oscillations. The reconstruction is allowed to be discontinuous across edges. The values on either side of edge \(e_{ij}\) are denoted
where \(m_{ij}\) is the midpoint of edge \(e_{ij}\).
Numerical flux — central-upwind scheme
The normal flux \(\mathbf{H}(\mathbf{U}) = \mathbf{E}(\mathbf{U})\,n_1 + \mathbf{G}(\mathbf{U})\,n_2\) is approximated using the central-upwind scheme of Kurganov, Noelle & Petrova [KurNP2001]:
with one-sided wave speed bounds
Time stepping
An explicit Euler scheme with adaptive timestep is used:
Stability requires the timestep to satisfy the Courant–Friedrichs–Lewy (CFL) condition:
where \(a_{ij} = \max\{a^+_{ij},\, -a^-_{ij}\}\) and \(r_i\) is the inradius (inscribed circle radius) of cell \(i\).
Flux Limiting
Near wet/dry boundaries the water depth \(h\) becomes very small, making the velocity recovery \(u = uh/h\) numerically unreliable and potentially producing unphysical speeds.
ANUGA replaces the raw velocity calculation with the limited approximation
where \(h_0\) is a regularisation parameter. Taking limits:
so the limiter smoothly recovers zero velocity at dryness and the true velocity in deep water.
ANUGA exposes a global minimum-depth parameter \(H_0\) (typically
\(10^{-3}\) m, set in anuga/config.py as minimum_allowed_height).
Setting
provides a good balance between accuracy and stability. At depth \(h = N H_0\) the predicted speed is scaled by
which converges quadratically to the true value with \(N\). The limiter is applied only for depths less than \(10\,H_0\) (roughly 1 cm for the default \(H_0\)), where it affects the computed velocity by less than 1 %.
Slope Limiting
A multidimensional slope-limiting technique (MinMod limiter) achieves second-order spatial accuracy and prevents spurious oscillations. Near the bed, the limiter must additionally ensure that no negative depths occur.
Let \(w\), \(z\), \(h\) be stage, bed elevation, and depth at the centroid, and let \(w_i\), \(z_i\), \(h_i\) be the corresponding vertex values. Define the minimum vertex depth as \(h_{\min} = \min_i h_i\).
Two reconstructed stages are computed:
\(\tilde{w}_i\) — stage from a gradient limiter applied to stage only (suitable for deep water where the bed slope can be ignored)
\(\bar{w}_i\) — stage from a gradient limiter applied to depth, respecting the bed slope (suitable for shallow water near wet/dry fronts)
The balanced stage is the linear combination
In deep water (\(h_{\min} \ge \varepsilon\)) we set \(\alpha = 1\) (stage-limited reconstruction only).
In shallow water (\(h_{\min} < \varepsilon\)) we choose the largest \(\alpha\) that still guarantees non-negative vertex depths:
where \(\bar{h}_i = \bar{w}_i - z_i\) and \(\tilde{h}_i = \tilde{w}_i - z_i\). Should \(\alpha\) fall outside \([0, 1]\) it is clamped to that interval.
See also
ANUGA User Manual — Chapter 16: Mathematical Background is the original source for this page and includes the parallel implementation theory, scalability results, and the full TikZ mesh diagrams.
References
Zoppou, C. & Roberts, S. (1999). Catastrophic collapse of water supply reservoirs in urban areas. Journal of Hydraulic Engineering, 125(7), 686–695.
Kurganov, A., Noelle, S. & Petrova, G. (2001). Semidiscrete central-upwind schemes for hyperbolic conservation laws and Hamilton–Jacobi equations. SIAM Journal on Scientific Computing, 23(3), 707–740.
Nielsen, O., Roberts, S., Gray, D., McPherson, A. & Hitchman, A. (2005). Hydrodynamic modelling of coastal inundation. MODSIM 2005 International Congress on Modelling and Simulation, 518–523.