# Depth averaged 2D model formulation¶

## Governing equations¶

The two dimensional model solves the depth averaged shallow water equations (5)-(6). The prognostic variables are the water elevation $$\eta$$ and depth averaged velocity $$\bar{\mathbf{u}}$$. The corresponding fields in Thetis are called 'elev_2d' and 'uv_2d'.

## Wetting and drying¶

Wetting and drying is included through the modified bathymetry formulation of Karna et al. (2011). The modified equations are given by (11)-(12).

## Spatial discretization¶

Thetis supports different finite element discretizations, summarised in the table below.

Element Family Name Degree n $$\bar{\mathbf{u}}$$ space $$\eta$$ space
Equal order DG 'dg-dg' 1, 2 P(n)DG P(n)DG
Raviart-Thomas DG 'rt-dg' 1, 2 RT(n+1) P(n)DG
P1DG-P2 'dg-cg' 1 P(n)DG P(n+1)

Table 1. Finite element families for polynomial degree n.

The element family and polynomial degree are set by the ModelOptions2d.element_family and ModelOptions2d.polynomial_degree options.

## Temporal discretization¶

Thetis supports different time integration methods, set by the ModelOptions2d.timestepper_type option.

Time integrator Thetis class Unconditionally stable Description
'ForwardEuler' ForwardEuler No Forward Euler method
'BackwardEuler' BackwardEuler Yes Backward Euler method
'CrankNicolson' CrankNicolson Yes Crank-Nicolson method
'DIRK33' DIRK33 Yes DIRK(3,4,3) method
'SSPRK33' SSPRK33 No SSPRK(3,3) method
'SSPIMEX' IMEXLPUM2 No LPUM2 SSP IMEX scheme
'PressureProjectionPicard' PressureProjectionPicard No Efficient pressure projection solver
'SteadyState' SteadyState Solves equations in steady state

Table 2. Time integration methods for 2D model.

Model time step is defined by the ModelOptions2d.timestep option.

For explicit solvers, Thetis can also estimate the maximum stable time step based on the mesh resolution, used element family and time integration scheme. To use this feature, the user should provide the maximal horizontal velocity scale with ModelOptions2d.horizontal_velocity_scale option and set ModelOptions2d.timestepper_options.use_automatic_timestep to True.