# Theory¶

## The non-linear shallow water equations (SWE)¶

The tsunami simulation code TsunAWI is based on the rotating non-linear SWE given by the vertically averaged equations of motion and continuity. We consider the boundary value problem in Cartesian coordinates in the plane domain with boundary at the time (1) (2) for the horizontal velocity vector and the total water depth as the sum of the unperturbed water depth and the surface elevation . Furthermore, denotes the gradient operator, the Coriolis parameter, the vertical unit vector, the bottom friction coefficient, and the eddy viscosity coefficient.

### Boundary conditions¶

On the solid part of the boundary , the condition

(3) for the velocity normal to is imposed. For the open part , the radiation boundary condition

(4) is implemented in TsunAWI providing free linear wave passage through the open boundary, given the Coriolis acceleration plays only a small role (for a review of several open boundary conditions see [RoedC86]).

Furthermore, as TsunAWI operates on unstructured grids, consider to avoid open boundaries by building a coarse global grid with a finely resolved focus on the region of interest.

For the benchmark problem “Monai Beach channel experiment”, an inflow condition is coded in benchmark.F90.

## Numerical implementation¶

### Finite element discretization¶

The spatial discretisation of TsunAWI is based on the finite element approach by Hanert et al. [HLRLD05] with modifications like added viscous and bottom friction terms, corrected momentum advection terms, radiation boundary condition, and nodal lumping of mass matrix in the continuity equation. Linear conforming ( ) basis function and linear non-conforming ( ) basis function for a triangular grid. The approximated sea surface height and velocity component as linear combinations of the basis functions and , respectively.

The basic principles of discretisation follow [HLRLD05] with linear conforming elements for sea surface height and water depth , and linear non-conforming elements for the velocity . Thus, values for sea surface are computed at element nodes, while the velocity components are regarded at the edges.

### Leap-frog time stepping scheme¶

The leap-frog discretisation was chosen as a simple and easily implemented method. We rewrite equations (1) and (2) in time discrete form with the time step length and the time index . The leap-frog scheme provides second-order accuracy and is neutral within the stability range. Notice that friction and viscosity contributions deviate from the usual leap-frog method.

This scheme, however, has a numerical mode, which is removed by the standard Robert–Asselin filter. For all variables in the time stepping scheme, we compute

(5) for a small .

### Momentum advection scheme¶

Because of the discontinuous character of velocity representation, special care is required with respect to the implementation of the momentum advection. Earlier experiments with code revealed problems with spatial noise and instability of the momentum advection when the discretisation is used as described by [HLRLD05]. A modified implementation without upwinding terms was found to work well when paired with rather high viscous dissipation to remove small-scale noise in the velocity field. In addition, the implementation of the momentum advection for velocities involves cycling over edges in the numerical code, in addition to cycling over elements to assemble the elemental contributions. This leads us to a simpler approach, which provides a smoothing of the velocity field while removing edge contributions.

According to this approach, prior to calculating the advection term in the momentum equation, we project the velocity from to space in order to smooth it. This projection becomes numerically efficient by nodal quadrature (lumped mass matrix). The projected velocity is then used to estimate the advection term. Finally, the result is multiplied with a basis function and integrated over the domain . This results in a very stable behaviour.

### Bottom friction¶

Manning bottom friction with a constant parameter is chosen for most calculations. Alternatively, a value varying with the surface structure can be provided.

### Viscosity¶

The coefficient for the horizontal viscosity is determined by a Smagorinsky parameterization [Sma63].

(6) Optionally, the standard linear viscosity may be chosen.

### Wetting and drying¶

#### Extrapolation from wet to dry nodes¶

For modelling wetting and drying, we use a moving boundary technique based on the “dry node concept” [LWL02]. The idea is to exclude dry nodes from the solution, but to extrapolate the elevation to the dry nodes from their wet neighbours. As this scheme is neutrally stable, it requires horizontal viscosity in places of large gradients of the solution. The Smagorinsky viscosity (6) fulfills this task while keeping the dissipation on a level that does not affect the quality of the solution.

The implementation in TsunAWI showed that in order to retain stability it has to be decided which values to extrapolate and how. Finally, linear extrapolation was chosen for the gradient and the sea surface height at dry elements and nodes. Furthermore, all other values at dry nodes, elements, and edges are excluded from further computations, as shown in the following figure. Sketch for the inundation scheme based on the extrapolation from the wet to the dry elements and nodes.

• Compute at wet elements, extrapolate to dry elements • Compute velocity at wet edges, set at dry edges.
• Compute at wet nodes, extrapolate to dry nodes #### GETM scheme¶

Alternatively, a linear damping factor can be employed in shallow regions [BBV04]. This scheme has many advantages regarding computational efficiency and simplicity. We have obtained promising results in test cases, however, the implementation in TsunAWI is not as fine tuned as the extrapolation scheme.

## Computational mesh¶

TsunAWI works on unstructured triangular meshes that allow to cover the coastal areas with a high resolution, while the long tsunami waves in the deep ocean can be represented by a coarse mesh, thus saving computation time and memory. Here, we describe some background on what to consider when building a mesh. See Mesh files on how to specify a mesh for TsunAWI. Zoom to the coast of Sumatra and the islands Simeulue and Nias in the computational mesh for the first set of scenarios for the Indonesian warning system.

### Mesh generation¶

The quality of the triangulation of the model domain is crucial for the model results. The meshes used in our studies were generated with a mesh generator based on the freely available software Triangle [She96]. Starting from a model domain defined within a topography/bathymetry data set (in our case GEBCO 30”); Triangle generates a mesh based on a refinement rule depending on the water depth and prescribed by the corresponding wave phase velocity and the Courant–Friedrichs–Lewy criterion (CFL). The triangulation will be refined until the edges in all triangles fulfill the criterion As the Triangle output is not smooth enough for numerical experiments, several smoothing iterations are applied. Each iteration consists of edge swapping, torsion smoothing, and linear smoothing. Torsion smoothing tries to adjust the angles around each node, linear smoothing acts on the distance between nodes. These strategies are described in [FF91].

As an example, the scenarios for the Indonesian warning system have a varying resolution of 12km in the deep ocean, 150m at the coast, and 50m in project regions and around tide gauges.

### Ordering the mesh for computational efficiency¶

The numbering of the nodes and elements has a strong influence on the computational efficiency. We got best results by geographically odering the nodes along a space filling Hilbert curve. Another option is to build the adjacency matrix and to employ reodering techniques like Reverse Cuthill-McKee (RCM) or Minimum Degree. In a final step, the elements should be ordered numerically by node indicees.

Performance similar to the space filling curve was obtained with Forsyth’s vertex cache optimization [For06]

## Uncertainties in tsunami modeling¶

When running a tsunami simulation, please always keep in mind that many uncertainties come into play.

Initial condition:
The bottom movement due to the earthquake is usually a large source of uncertainty. In addition to a not fully known earthquake mechanism, the earthquake might trigger land slides.
Bathymetry and topography data:
The quality of the data is crucial for the result. Freely available data like GEBCO and SRTM are usually sufficient for a rough estimate of the wave height at the coast, but not well suited to assess the inundation. On a local level, the tsunami might be amplified by features like a hill, a channel, or a very steep slope that are missing in the data.
Model physics:
The non-linear shallow water equations are derived with the assumptions that the wave length is larger than the water depth and that the vertical velocity component is constant in the water column. These assumptions are no longer valid for example for water streaming through the structures of a harbour or through streets. Furthermore, additional aspects like tides are neglected.
Parameters, parameterisations, and mesh resolution:
The bottom roughness or the viscosity are physical phenomena, however, the numerical representation is a simplification and dependend on the mesh resolution.
Bugs in the code:
And, of course, it is a reasonable assumption that TsunAWI is not bugfree.