Examples

The examples below range from a minimal introductory script through to real-world flood and tsunami validation cases. Each notebook can be downloaded and run locally; the script example is also available in the examples/simple_examples/ directory of the repository.

Example

Description

Level

Simple script

Wave runup on a linearly sloping bed using a rectangular mesh. Introduces the core ANUGA workflow: mesh creation, set_quantity, boundary conditions, and the evolve loop. No external data files required.

Beginner

Simple notebook

The same runup scenario presented as an interactive Jupyter notebook with inline animation via Domain_plotter. A good starting point for exploring ANUGA interactively.

Beginner

Domain from regions

Builds an unstructured mesh from a bounding polygon with multiple tagged boundary segments using create_domain_from_regions. Demonstrates mesh refinement with maximum_triangle_area and multi-tag boundary assignment.

Intermediate

Domain from a DEM

Real-world urban flood model of Merewether, Newcastle (NSW): houses as holes, an Inlet_operator inflow, a depth animation, and results checked against observations with SWW_plotter. The mesh is sized from the DEM’s flow paths with create_domain_from_dem and compared with a uniform mesh: a quarter of the triangles, twice the timestep, the same flood levels at the observation points.

Intermediate

Domain with riverwalls

Adds infinitely-thin levee/riverwall structures to a mesh using breaklines (to align triangle edges with the wall) and create_riverwalls. Compares flow with and without the wall in place.

Intermediate

Tsunami benchmark

Okushiri Island tsunami runup (IWTS Benchmark 2) with incoming wave specified via Transmissive_n_momentum_zero_t_momentum_set_stage_boundary and spatially interpolated bathymetry. Simulated water-surface time series are compared against physical model gauge data.

Advanced

Sediment transport

Suspended sediment with add_sediment_fraction: scour of a sand bed in a sloping channel, with the concentration and bed change plotted on the mesh, then sediment settling out of still water compared against its reference solution (the same case as the sediment_settling validation test).

Intermediate