3. Bathymetry & Boundary Conditions

3.2. Reflecting Boundary Conditions

Implementation

For reflecting boundaries (3.2.1) we added a BoundaryCondition enum (Outflow / Reflecting) and a new method setGhost(left, right) on WavePropagation1d. A reflecting ghost cell copies \(h\) and negates \(hu\); an outflow cell copies both. setGhostOutflow() now simply calls setGhost(Outflow, Outflow).

The boundary type per side is selected via the CLI flags --bc-left / --bc-right (outflow / reflecting, default outflow).

For 3.2.2 a standard DamBreak with a reflecting right boundary is sufficient — the reflection produces the same behaviour as a symmetric ShockShock problem at the wall.

Unit Tests

[WaveProp1dReflecting] checks the three boundary combinations (Reflecting/Reflecting, Outflow/Reflecting, setGhostOutflow ≡ Outflow/Outflow) and verifies that \(h\) is copied and \(hu\) is negated only on reflecting sides.

Results

3.1 Non-zero Source Term

Example with non-zero source term (3.1.2)

Setup To illustrate the effect of bathymetry, the :class:ShockShock1d setup was extended with an optional Gaussian bathymetric feature of the form \(b(x) = A \cdot \exp\!\left(-\frac{(x-x_0)^2}{2\sigma^2}\right)\), controlled by amplitude \(A\), center \(x_0\), and width \(\sigma\). Setting \(A = 0\) recovers the original flat-bottom shock-shock problem.

ss ssb ssbnc

Setup: DamBreak 15 10 (dam position per scenario). Upon impact with a wall the momentum does not simply reverse — the water briefly backs up (\(u \to 0\)), then a new shock with increased water height travels back.

One-sided reflection (right boundary):

../_images/dam_reflect.gif

Two-sided reflection (waves bouncing between both walls):

../_images/dam_reflect_both_walls.gif

3.3. Hydraulic Jumps

Subcritical Flow (3.3.1/3.3.2)

The subcritical setup uses a parabolic hump over the interval \(x \in (8, 12)\) on the domain \((0, 25)\) with bathymetry

\[\begin{split}b(x) = \begin{cases} -1.8 - 0.05 (x-10)^2 & \text{if } x \in (8,12) \\ -2 & \text{else} \end{cases}\end{split}\]

and initial conditions \(h(x, 0) = -b(x)\), \(hu(x, 0) = 4.42\).

../_images/subcritical.gif

Maximum Froude number at t = 0

The Froude number is defined as

\[F(x) := \frac{u}{\sqrt{g h}} = \frac{hu}{h \sqrt{g h}}\]

Since \(hu = 4.42\) is constant and \(h = -b(x)\), the Froude number is maximized where \(h\) is minimal, i.e., at the hump peak \(x = 10\) where \(h(10) = 1.8\).

\[F_{\max} = \frac{4.42}{1.8 \cdot \sqrt{9.80665 \cdot 1.8}} = \frac{4.42}{1.8 \cdot 4.201} \approx 0.584\]

Since \(F_{\max} < 1\) everywhere, the flow remains subcritical throughout the entire domain at \(t = 0\).

Supercritical Flow (3.3.1/3.3.2)

The supercritical setup uses the same domain with bathymetry

\[\begin{split}b(x) = \begin{cases} -0.13 - 0.05 (x-10)^2 & \text{if } x \in (8,12) \\ -0.33 & \text{else} \end{cases}\end{split}\]

and initial conditions \(h(x, 0) = -b(x)\), \(hu(x, 0) = 0.18\).

../_images/supercritical.gif

Maximum Froude number at \(t = 0\)

At the hump peak \(x = 10\) the water height is \(h(10) = 0.13\). Away from the hump the water height is \(h = 0.33\). The Froude numbers are:

\[F(10) = \frac{0.18}{0.13 \cdot \sqrt{9.80665 \cdot 0.13}} \approx 1.23 \qquad F_{\text{flat}} = \frac{0.18}{0.33 \cdot \sqrt{9.80665 \cdot 0.33}} \approx 0.30\]

The flow transitions from subcritical (\(F < 1\)) in the flat regions to supercritical (\(F > 1\)) over the hump peak. The location of the maximum Froude number is \(x = 10\) with \(F_{\max} \approx 1.23\).

Hydraulic jump and failure to converge

In the supercritical case a stationary shock — a hydraulic jump — forms downstream of the hump where the flow transitions back from supercritical to subcritical. Analytically, conservation of mass in a stationary 1D flow without sources requires \(hu = \text{const} = 0.18\) everywhere.

The f-wave solver, however, fails to converge to this analytical solution. At \(t \approx 10\), the domain has settled into a spurious steady state: the momentum \(hu\) takes the value \(\approx 0.1248\) left of the hump, jumps to \(\approx 0.148\) at the hydraulic jump located near \(x \approx 11.5\), and returns to \(\approx 0.1248\) right of the hump — instead of the analytically expected constant value of \(0.18\) everywhere. This discrepancy persists regardless of grid refinement, demonstrating a known limitation of the standard f-wave approach for supercritical flows with hydraulic jumps.

3.4. 1D Tsunami Simulation

Bathymetry Data Extraction (3.4.1)

We extract bathymetry data from the GEBCO 2025 Grid using GMT. The workflow is automated in scripts/extract_bathymetry.sh:

./scripts/extract_bathymetry.sh tohoku --map --pdf
./extract_bathymetry.sh nordsee \
     --region 6/15/53/56 \
     --profile-start 8.7/53.87 \
     --profile-end 8.7/56.0 \
     --sampling 500 \
     --map --pdf

The script downloads the GEBCO data if not present, cuts the specified region with gmt grdcut, extracts a 1D profile via gmt grdtrack, and converts the output to CSV. Optionally it generates a map with coastlines and the profile line overlaid.

For the domain between \(p_1 = (141.024949, 37.316569)\) and \(p_2 = (146.0, 37.316569)\) at 250 m sampling, the extraction yields 1903 data points. The profile CSV is stored in resources/, map visualizations go to simulations/visualizations/<name>/.

CSV Reader (3.4.2)

We extended tsunami_lab::io::Csv with a static read method that parses bathymetry CSV files (format: longitude,latitude,distance,bathymetry). The reader skips comment lines (#) and the header, converts the distance column from km to metres, and returns raw arrays for position and bathymetry.

TsunamiEvent1d Setup (3.4.3)

The new setup setups::TsunamiEvent1d takes a CSV file path as input and initializes the simulation with \(\delta = 20\,\text{m}\) to ensure a minimum water height everywhere, avoiding numerical issues from dry cells. The artificial displacement is:

\[\begin{split}d(x) = \begin{cases} 10 \cdot \sin\!\left(\frac{x - 175000}{37500}\,\pi + \pi\right) & \text{if } 175000 < x < 250000 \\ 0 & \text{else} \end{cases}\end{split}\]

The setup uses linear interpolation between CSV data points for arbitrary query positions.

Simulation Results (3.4.4)

We run the simulation with:

./build/tsunami_lab -n 1000 -d 440000 -t 3600 \
  --bc-left reflecting \
  -p TsunamiEvent resources/tohoku_bathymetry_profile.csv

With the default displacement amplitude of 10 m, the wave is barely visible in the visualization. This is physically expected: in the open ocean (depth \(\approx 5000\,\text{m}\)), a tsunami wave is only a few metres high. The wave-to-depth ratio is on the order of \(10/5000 = 0.2\%\), making it nearly invisible at the scale of the full bathymetry cross-section.

../_images/tohoku_tsunami_10.gif

Modified Displacement (3.4.5, optional)

Increasing the displacement amplitude by a factor of 1000 (i.e., \(d_{\max} = 10000\,\text{m}\)) produces a clearly visible wave. The wave propagates in both directions from the displacement region: the rightward wave leaves the domain through the outflow boundary, while the leftward wave travels toward shore and reflects off the left boundary (reflecting BC).

../_images/tohoku_tsunami_1000.gif

The higher displacement demonstrates the expected behavior: larger initial perturbations produce proportionally stronger waves, and the reflecting boundary correctly prevents water from leaving the domain at the coast.

Individual Contributions

  • Yannik Köllmann: Implementation of 3.4 (bathymetry extraction script, CSV reader, TsunamiEvent1d setup, simulation runs and visualizations).

  • Jan Vogt: Implementation of 3.2.1 (BoundaryCondition, setGhost, CLI flags, [WaveProp1dReflecting] tests), reflection setup and visualizations for 3.2.2, as well as this documentation.

  • Mika Brückner: Integration of bathymetry support into the project (3.1). Integration of optional bathymetry data into the ShockShock1d setup (3.1.2) and generation of corresponding visualizations. Implementation of subcritical and supercritical flow setups (3.3) and related visualizations. Computation of maximum Froude numbers and analysis of hydraulic jump convergence issues (3.3.1 / 3.3.3).