# Shallow water equations

File:Shallow water waves.gif
Output from a shallow water equation model of water in a bathtub. The water experiences five splashes which generate surface gravity waves that propagate away from the splash locations and reflect off the bathtub walls.

The shallow water equations (also called Saint-Venant equations in its unidimensional form, after Adhémar Jean Claude Barré de Saint-Venant) are a set of hyperbolic partial differential equations (or parabolic if viscous shear is considered) that describe the flow below a pressure surface in a fluid (sometimes, but not necessarily, a free surface). The shallow water equations can also be simplified to the commonly used 1-D Saint-Venant equation.

The equations are derived[1] from depth-integrating the Navier–Stokes equations, in the case where the horizontal length scale is much greater than the vertical length scale. Under this condition, conservation of mass implies that the vertical velocity of the fluid is small. It can be shown from the momentum equation that vertical pressure gradients are nearly hydrostatic, and that horizontal pressure gradients are due to the displacement of the pressure surface, implying that the horizontal velocity field is constant throughout the depth of the fluid. Vertically integrating allows the vertical velocity to be removed from the equations. The shallow water equations are thus derived.

While a vertical velocity term is not present in the shallow water equations, note that this velocity is not necessarily zero. This is an important distinction because, for example, the vertical velocity cannot be zero when the floor changes depth, and thus if it were zero only flat floors would be usable with the shallow water equations. Once a solution (i.e. the horizontal velocities and free surface displacement) has been found, the vertical velocity can be recovered via the continuity equation.

Situations in fluid dynamics where the horizontal length scale is much greater than the vertical length scale are common, so the shallow water equations are widely applicable. They are used with Coriolis forces in atmospheric and oceanic modeling, as a simplification of the primitive equations of atmospheric flow.

Shallow water equation models have only one vertical level, so they cannot directly encompass any factor that varies with height. However, in cases where the mean state is sufficiently simple, the vertical variations can be separated from the horizontal and several sets of shallow water equations can describe the state.

## Equations

### Conservative form

The shallow water equations are derived from equations of conservation of mass and conservation of linear momentum (the Navier–Stokes equations), which hold even when the assumptions of shallow water break down, such as across a hydraulic jump. In the case of no Coriolis, frictional or viscous forces, the shallow-water equations are:

\begin{align} \frac{\partial \eta }{\partial t} + \frac{\partial (\eta u)}{\partial x} + \frac{\partial (\eta v)}{\partial y} & = 0\\[3pt] \frac{\partial (\eta u)}{\partial t}+ \frac{\partial}{\partial x}\left( \eta u^2 + \frac{1}{2}g \eta^2 \right) + \frac{\partial (\eta u v)}{\partial y} & = 0\\[3pt] \frac{\partial (\eta v)}{\partial t} + \frac{\partial (\eta uv)}{\partial x} + \frac{\partial}{\partial y}\left(\eta v^2 + \frac{1}{2}g \eta ^2\right) & = 0. \end{align}

Here η is the total fluid column height, and "H" is the water depth if the surface is at rest. The 2D vector (u,v) is the fluid's horizontal velocity, averaged across the vertical column. g is acceleration due to gravity. The first equation is derived from mass conservation, the second two from momentum conservation.[2]

### Non-conservative form

Expanding the derivatives in the above using the product rule, we obtain non-conservative forms of the shallow-water equations. Since velocities are not subject to a fundamental conservation equation, the non-conservative forms do not hold across a shock or hydraulic jump. When we include also the appropriate terms for Coriolis, frictional and viscous forces, we obtain:

\begin{align} \frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} + v\frac{\partial u}{\partial y} - f v& = -g \frac{\partial h}{\partial x} - b u,\\[3pt] \frac{\partial v}{\partial t} + u\frac{\partial v}{\partial x} + v\frac{\partial v}{\partial y} + f u& = -g \frac{\partial h}{\partial y} - b v,\\[3pt] \frac{\partial h}{\partial t}& = - \frac{\partial}{\partial x} \Bigl( u \left( H + h \right) \Bigr) - \frac{\partial}{\partial y} \Bigl(v \left( H + h \right) \Bigr), \end{align}

where

 u is the velocity in the x direction, or zonal velocity v is the velocity in the y direction, or meridional velocity h is the height deviation of the horizontal pressure surface from its mean height H H is the mean height of the horizontal pressure surface g is the acceleration due to gravity f is the Coriolis coefficient associated with the Coriolis force, on Earth equal to 2Ω sin(φ), where Ω is the angular rotation rate of the Earth (π/12 radians/hour), and φ is the latitude b is the viscous drag coefficient

It is often the case that the terms quadratic in u and v, which represent the effect of bulk advection, are small compared to the other terms. This is called geostrophic balance, and is equivalent to saying that the Rossby number is small. Assuming also that the wave height is very small compared to the mean height (h H), we have:

\begin{align} \frac{\partial u}{\partial t} - f v& = -g \frac{\partial h}{\partial x} - b u,\\[3pt] \frac{\partial v}{\partial t} + f u& = -g \frac{\partial h}{\partial y} - b v,\\[3pt] \frac{\partial h}{\partial t}& = - H \Bigl( \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} \Bigr) \end{align}

## Wave modelling by shallow water equations

Shallow water equations can be used to model Rossby and Kelvin waves in the atmosphere, rivers, lakes and oceans as well as gravity waves in a smaller domain (e.g. surface waves in a bath). In order for shallow water equations to be valid, the wavelength of the phenomenon they are supposed to model has to be much higher than the depth of the basin where the phenomenon takes place. Shallow water equations are especially suitable to model tides which have very large length scales (over hundred of kilometers). For tidal motion, even a very deep ocean may be considered as shallow as its depth will always be much smaller than the tidal wavelength.

File:Tsunami with Boussinesq and Shallow water equations.gif
Tsunami generation and propagation, as computed with the shallow water equations (red line; without frequency dispersion)), and with a Boussinesq-type model (blue line; with frequency dispersion). Observe that the Boussinesq-type model (blue line) forms a soliton with an oscillatory tail staying behind. The shallow water equations (red line) form a steep front, which will lead to bore formation, later on. The water depth is 100 meters.