Equations

DispersiveShallowWater.jl provides six different dispersive shallow water equation systems for modeling water waves. Each equation system offers different levels of physical accuracy, computational complexity, and supports various boundary conditions and bathymetry types.

Supported Models and Features

The following table provides an overview of all available equation systems and their supported features:

EquationVariablesPeriodic boundary conditionsReflecting boundary conditionsFlat BathymetryMild-slope BathymetryVariable BathymetryRelaxationSource Terms
KdV$(\eta)$
BBM$(\eta)$
BBM-BBM$(\eta, v, D)$
Svärd-Kalisch$(\eta, v, D)$✅ᵃ
Serre-Green-Naghdi$(\eta, v, D)$
Hyperbolic SGN$(\eta, v, D, w, H)$

ᵃReflecting boundary conditions for Svärd-Kalisch equations require alpha = gamma = 0

Variable Descriptions

water height and bathymetry

  • $\eta$: Total water height
  • $v$: Velocity in horizontal direction
  • $D$: Still-water depth
  • $w$: Auxiliary variable in hyperbolic approximation ($\approx -h v_x$)
  • $H$: Auxiliary variable in hyperbolic approximation ($\approx h$)

Abstract Shallow Water Equations Interface

Several equation systems in DispersiveShallowWater.jl (BBMBBMEquations1D, SvaerdKalischEquations1D, SerreGreenNaghdiEquations1D, and HyperbolicSerreGreenNaghdiEquations1D) are subtypes of AbstractShallowWaterEquations. This design reflects that these systems all contain the classical shallow water equations as a subsystem, extended with additional dispersive terms.

The common interface provides shared functionality like waterheight, velocity, energy_total, and entropy. This enables consistent analysis and visualization across different dispersive models while maintaining the underlying shallow water physics.

Hyperbolic Approximations

Some equations are hyperbolic approximations of other systems (e.g., HyperbolicSerreGreenNaghdiEquations1D approximates SerreGreenNaghdiEquations1D). These systems support two approaches for initial conditions:

  1. Full variables: Specify all primitive variables including auxiliary variables $(\eta, v, D, w, H)$
  2. Physical variables: Specify only the physical variables $(\eta, v, D)$ from the limit system. The auxiliary variables are automatically initialized using appropriate approximations.

This flexibility allows using the same initial conditions for both the original and hyperbolic systems, simplifying comparisons and testing.

Detailed Documentation

Each equation system below includes its complete mathematical formulation, physical background, implementation details, conservation properties, and relevant literature references.

Korteweg–De Vries (KdV)

DispersiveShallowWater.KdVEquation1DType
KdVEquation1D(; gravity, D = 1.0, eta0 = 0.0)

KdV (Korteweg-de Vries) equation in one spatial dimension. The equation is given by

\[\begin{aligned} \eta_t+\sqrt{g D} \eta_x+3 / 2 \sqrt{g / D} \eta \eta_x+1 / 6 \sqrt{g D} D^2 \eta_{x x x} &= 0. \end{aligned}\]

The unknown quantity of the KdV equation is the total water height $\eta$. The gravitational acceleration gravity is denoted by $g$ and the constant bottom topography (bathymetry) $b = \eta_0 - D$, where $\eta_0$ is the constant still-water surface and $D$ the still-water depth. The water height above the bathymetry is therefore given by $h = \eta - \eta_0 + D$. The KdV equation is only implemented for $\eta_0 = 0$.

The equations only support a flat bathymetry.

The KdV equation is first introduced by Joseph Valentin Boussinesq (1877) and rediscovered by Diederik Korteweg and Gustav de Vries in 1895.

The semidiscretization implemented here is a modification of the one proposed by Biswas, Ketcheson, Ranocha, and Schütz (2025) for the non-dimensionalized KdV equation $u_t + u u_x + u_{x x x} = 0.$

The semidiscretization looks the following:

\[\begin{aligned} \eta_t+\sqrt{g D} D_1\eta+ 1 / 2 \sqrt{g / D} \eta D_1 \eta + 1 / 2 \sqrt{g / D} D_1 \eta^2 +1 / 6 \sqrt{g D} D^2 D_3\eta &= 0. \end{aligned}\]

where $D_1$ is a first-derivative operator, $D_3$ a third-derivative operator, and $D$ the still-water depth.

It conserves

  • the total water mass (integral of $\eta$) as a linear invariant

and if upwind operators ($D_3 = D_{1,+} D_1 D_{1,-}$) or wide-stencil operators ($D_3 = D_1^3$) are used for the third derivative, it also conserves

  • the energy (integral of $1/2\eta^2$)

for periodic boundary conditions.

  • Diederik Korteweg and Gustav de Vries (1895) On the change of form of long waves advancing in a rectangular canal, and on a new type of long stationary waves DOI: 10.1080/14786449508620739
  • Abhijit Biswas, David I. Ketcheson, Hendrik Ranocha and Jochen Schütz (2025) Traveling-Wave Solutions and Structure-Preserving Numerical Methods for a Hyperbolic Approximation of the Korteweg-de Vries Equation DOI: 10.1007/s10915-025-02898-x
source

Benjamin-Bona-Mahony (BBM)

DispersiveShallowWater.BBMEquation1DType
BBMEquation1D(; gravity, D = 1.0, eta0 = 0.0, split_form = true)

BBM (Benjamin–Bona–Mahony) equation in one spatial dimension. The equation is given by

\[\begin{aligned} \eta_t + \sqrt{gD}\eta_x + \frac{3}{2}\sqrt{\frac{g}{D}}\eta\eta_x - \frac{1}{6}D^2\eta_{xxt} &= 0. \end{aligned}\]

The unknown quantity of the BBM equation is the total water height $\eta$. The gravitational acceleration gravity is denoted by $g$ and the constant bottom topography (bathymetry) $b = \eta_0 - D$, where $\eta_0$ is the constant still-water surface and $D$ the still-water depth. The water height above the bathymetry is therefore given by $h = \eta - \eta_0 + D$. The BBM equation is only implemented for $\eta_0 = 0$.

The equations only support a flat bathymetry.

The BBM equation is first described in Benjamin, Bona, and Mahony (1972). The semidiscretization implemented here is developed in Ranocha, Mitsotakis, and Ketcheson (2020) for split_form = true and in Linders, Ranocha, and Birken (2023) for split_form = false. If split_form is true, a split form in the semidiscretization is used, which conserves

  • the total water mass (integral of $h$) as a linear invariant
  • a quadratic invariant (integral of $1/2\eta(\eta - 1/6D^2\eta_{xx})$ or for periodic boundary conditions equivalently $1/2(\eta^2 + 1/6D^2\eta_x^2)$), which is called here energy_total_modified (and entropy_modified) because it contains derivatives of the solution

for periodic boundary conditions. If split_form is false the semidiscretization conserves

  • the total water mass (integral of $h$) as a linear invariant
  • the Hamiltonian (integral of $1/4\sqrt{g/D}\eta^3 + 1/2\sqrt{gD}\eta^2$) (see hamiltonian)

for periodic boundary conditions.

  • Thomas B. Benjamin, Jerry L. Bona and John J. Mahony (1972) Model equations for long waves in nonlinear dispersive systems DOI: 10.1098/rsta.1972.0032
  • Hendrik Ranocha, Dimitrios Mitsotakis and David I. Ketcheson (2020) A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations DOI: 10.4208/cicp.OA-2020-0119
  • Viktor Linders, Hendrik Ranocha and Philipp Birken (2023) Resolving entropy growth from iterative methods DOI: 10.1007/s10543-023-00992-w
source

BBM-BBM

DispersiveShallowWater.BBMBBMEquations1DType
BBMBBMEquations1D(; bathymetry_type = bathymetry_variable,
                  gravity, eta0 = 0.0)

BBM-BBM (Benjamin–Bona–Mahony) system in one spatial dimension. The equations for flat bathymetry are given by

\[\begin{aligned} \eta_t + ((\eta + D)v)_x - \frac{1}{6}D^2\eta_{xxt} &= 0,\\ v_t + g\eta_x + \left(\frac{1}{2}v^2\right)_x - \frac{1}{6}D^2v_{xxt} &= 0. \end{aligned}\]

The unknown quantities of the BBM-BBM equations are the total water height $\eta$ and the velocity $v$. The gravitational acceleration gravity is denoted by $g$ and the constant bottom topography (bathymetry) $b = \eta_0 - D$. The water height above the bathymetry is therefore given by $h = \eta - \eta_0 + D$. The BBM-BBM equations are only implemented for $\eta_0 = 0$.

Two types of bathymetry_type are supported:

For the general case of variable vathymetry the BBM-BBM equations are

\[\begin{aligned} \eta_t + ((\eta + D)v)_x - \frac{1}{6}(D^2\eta_{xt})_x &= 0,\\ v_t + g\eta_x + \left(\frac{1}{2}v^2\right)_x - \frac{1}{6}(D^2v_t)_{xx} &= 0. \end{aligned}\]

One reference for the BBM-BBM system can be found in Bona et al. (1998). The semidiscretization implemented here was developed for flat bathymetry in Ranocha et al. (2020) and generalized for a variable bathymetry in Lampert and Ranocha (2024). It conserves

  • the total water mass (integral of $h$) as a linear invariant
  • the total velocity (integral of $v$) as a linear invariant for flat bathymetry
  • the total energy

for periodic boundary conditions (see Lampert, Ranocha). For reflecting boundary conditions, the semidiscretization conserves

  • the total water (integral of $h$) as a linear invariant
  • the total energy.

Additionally, it is well-balanced for the lake-at-rest stationary solution, see Lampert and Ranocha (2024).

  • Jerry L. Bona, Min Chen (1998) A Boussinesq system for two-way propagation of nonlinear dispersive waves DOI: 10.1016/S0167-2789(97)00249-2
  • Hendrik Ranocha, Dimitrios Mitsotakis, David I. Ketcheson (2020) A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations DOI: 10.4208/cicp.OA-2020-0119
  • Joshua Lampert, Hendrik Ranocha (2024) Structure-Preserving Numerical Methods for Two Nonlinear Systems of Dispersive Wave Equations DOI: 10.48550/arXiv.2402.16669
source

Svärd-Kalisch

DispersiveShallowWater.SvaerdKalischEquations1DType
SvaerdKalischEquations1D(; bathymetry_type = bathymetry_variable, gravity,
                         eta0 = 0.0, alpha = 0.0, beta = 1/3, gamma = 0.0)

Dispersive system by Svärd and Kalisch (2023) in one spatial dimension. The equations for variable bathymetry are given in conservative variables by

\[\begin{aligned} h_t + (hv)_x &= (\hat\alpha(\hat\alpha(h + b)_x)_x)_x,\\ (hv)_t + (hv^2)_x + gh(h + b)_x &= (\hat\alpha v(\hat\alpha(h + b)_x)_x)_x + (\hat\beta v_x)_{xt} + \frac{1}{2}(\hat\gamma v_x)_{xx} + \frac{1}{2}(\hat\gamma v_{xx})_x, \end{aligned}\]

where $\hat\alpha^2 = \alpha\sqrt{gD}D^2$, $\hat\beta = \beta D^3$, $\hat\gamma = \gamma\sqrt{gD}D^3$. The coefficients $\alpha$, $\beta$ and $\gamma$ are provided in dimensionless form and $D = \eta_0 - b$ is the still-water depth and eta0 is the still-water surface (lake-at-rest). The equations can be rewritten in primitive variables as

\[\begin{aligned} \eta_t + ((\eta + D)v)_x &= (\hat\alpha(\hat\alpha\eta_x)_x)_x,\\ v_t(\eta + D) - v((\eta + D)v)_x + ((\eta + D)v^2)_x + g(\eta + D)\eta_x &= (\hat\alpha v(\hat\alpha\eta_x)_x)_x - v(\hat\alpha(\hat\alpha\eta_x)_x)_x + (\hat\beta v_x)_{xt} + \frac{1}{2}(\hat\gamma v_x)_{xx} + \frac{1}{2}(\hat\gamma v_{xx})_x. \end{aligned}\]

The unknown quantities of the Svärd-Kalisch equations are the total water height $\eta$ and the velocity $v$. The gravitational acceleration gravity is denoted by $g$ and the bottom topography (bathymetry) $b = \eta_0 - D$. The water height above the bathymetry is therefore given by $h = \eta - \eta_0 + D$.

Currently, the equations only support a general variable bathymetry, see bathymetry_variable.

SvärdKalischEquations1D is an alias for SvaerdKalischEquations1D.

The equations by Svärd and Kalisch are presented and analyzed in Svärd and Kalisch (2025). The semidiscretization implemented here conserves

  • the total water mass (integral of $h$) as a linear invariant
  • the total momentum (integral of $h v$) as a nonlinear invariant for flat bathymetry
  • the total modified energy

for periodic boundary conditions (see Lampert, Ranocha). Additionally, it is well-balanced for the lake-at-rest stationary solution, see Lampert and Ranocha (2024).

source

Serre-Green-Naghdi

DispersiveShallowWater.SerreGreenNaghdiEquations1DType
SerreGreenNaghdiEquations1D(; bathymetry_type = bathymetry_variable,
                            gravity, eta0 = 0.0)

Serre-Green-Naghdi system in one spatial dimension. The equations for flat bathymetry are given by

\[\begin{aligned} h_t + (h v)_x &= 0,\\ h v_t - \frac{1}{3} (h^3 v_{tx})_x + \frac{1}{2} g (h^2)_x + \frac{1}{2} h (v^2)_x + p_x &= 0,\\ p &= \frac{1}{3} h^3 v_{x}^2 - \frac{1}{3} h^3 v v_{xx}. \end{aligned}\]

The unknown quantities of the Serre-Green-Naghdi equations are the total water height $\eta = h + b$ and the velocity $v$. The gravitational acceleration gravity is denoted by $g$ and the bottom topography (bathymetry) $b = \eta_0 - D$. The water height above the bathymetry is therefore given by $h = \eta - \eta_0 + D$. The total water height is therefore given by $\eta = h + b$.

Three types of bathymetry_type are supported:

For the mild-slope approximation, the Serre-Green-Naghdi equations are

\[\begin{aligned} h_t + (h v)_x &= 0,\\ h v_t - \frac{1}{3} (h^3 v_{tx})_x + \frac{1}{2} (h^2 b_x v_t)_x - \frac{1}{2} h^2 b_x v_{tx} + \frac{3}{4} h b_x^2 v_t + \frac{1}{2} g (h^2)_x + g h b_x + \frac{1}{2} h (v^2)_x + p_x + \frac{3}{2} \frac{p}{h} b_x &= 0,\\ p &= \frac{1}{3} h^3 v_{x}^2 - \frac{1}{3} h^3 v v_{xx} + \frac{1}{2} h^2 v (b_x v)_x. \end{aligned}\]

For the general case of variable bathymetry without mild-slope approximation, the Serre-Green-Naghdi equations are

\[\begin{aligned} h_t + (h v)_x &= 0,\\ h v_t - \frac{1}{3} (h^3 v_{tx})_x + \frac{1}{2} (h^2 b_x v_t)_x - \frac{1}{2} h^2 b_x v_{tx} + h b_x^2 v_t + \frac{1}{2} g (h^2)_x + g h b_x + \frac{1}{2} h (v^2)_x + p_x + \frac{3}{2} \frac{p}{h} b_x + \psi b_x &= 0,\\ p &= \frac{1}{3} h^3 v_{x}^2 - \frac{1}{3} h^3 v v_{xx} + \frac{1}{2} h^2 v (b_x v)_x,\\ \psi &= \frac{1}{4} h v (b_x v)_x. \end{aligned}\]

References for the Serre-Green-Naghdi system can be found in

The semidiscretization implemented here conserves

  • the total water mass (integral of $h$) as a linear invariant
  • the total momentum (integral of $h v$) as a nonlinear invariant if the bathymetry is constant
  • the total modified energy

for periodic boundary conditions (see Ranocha and Ricchiuto (2024)). Additionally, it is well-balanced for the lake-at-rest stationary solution, see

  • Hendrik Ranocha and Mario Ricchiuto (2024) Structure-preserving approximations of the Serre-Green-Naghdi equations in standard and hyperbolic form arXiv: 2408.02665
source

Hyperbolic Serre-Green-Naghdi

DispersiveShallowWater.HyperbolicSerreGreenNaghdiEquations1DType
HyperbolicSerreGreenNaghdiEquations1D(; bathymetry_type = bathymetry_mild_slope,
                                      gravity,
                                      eta0 = 0.0,
                                      lambda)

Hyperbolic approximation of the Serre-Green-Naghdi system in one spatial dimension. The equations for flat bathymetry are given by

\[\begin{aligned} h_t + (h v)_x &= 0,\\ h v_t + \frac{1}{2} g (h^2)_x + \frac{1}{2} h (v^2)_x + \biggl( \frac{\lambda}{3} H (1 - H / h) \biggr)_x &= 0,\\ h w_t + h v w_x &= \lambda (1 - H / h),\\ H_t + H_x u &= w. \end{aligned}\]

The unknown quantities of the hyperbolized Serre-Green-Naghdi equations are the total water height $\eta = h + b$ and the velocity $v$. The gravitational acceleration gravity is denoted by $g$ and the bottom topography (bathymetry) $b = \eta_0 - D$. The water height above the bathymetry is therefore given by $h = \eta - \eta_0 + D$. The total water height is therefore given by $\eta = h + b$.

There are two additional variables $w \approx -h v_x$ and $H \approx h$ compared to the SerreGreenNaghdiEquations1D. In the original papers of Gavrilyuk et al., the variable $H$ is called $\eta$. Here, we use $\eta$ for the total water height and $H$ for auxiliary variable introduced in the hyperbolic approximation.

Initial conditions

The HyperbolicSerreGreenNaghdiEquations1D allow two options for specifying initial conditions:

  1. Returning the full set of variables q = (η, v, D, w, H)
  2. Returning a reduced set of variables q = (η, v, D) as required for the limit system SerreGreenNaghdiEquations1D of the hyperbolic approximation. The remaining variables w and H are initialized using the default initialization $w \approx -h v_x$ and $H \approx h$ using the derivative operator of the solver.

The relaxation parameter lambda ($\lambda$) introduced to obtain this hyperbolic approximation of the SerreGreenNaghdiEquations1D influences the stiffness of the system. For $\lambda \to \infty$, the hyperbolic Serre-Green-Naghdi equations converge (at least formally) to the original SerreGreenNaghdiEquations1D. However, the wave speeds of the hyperbolic system increase with increasing $\lambda$, so that explicit time integration methods become more expensive.

Two types of bathymetry_type are supported:

For the mild-slope approximation, the Serre-Green-Naghdi equations are

\[\begin{aligned} h_t + (h v)_x &= 0,\\ h v_t + \frac{1}{2} g (h^2)_x + \frac{1}{2} h (v^2)_x + \biggl( \frac{\lambda}{3} H (1 - H / h) \biggr)_x + \biggl( g h + \frac{\lambda}{2} (1 - H / h) \biggr) b_x &= 0,\\ h w_t + h v w_x &= \lambda (1 - H / h),\\ H_t + H_x u + \frac{3}{2} b_x v &= w. \end{aligned}\]

References for the hyperbolized Serre-Green-Naghdi system can be found in

  • Favrie and Gavrilyuk. A rapid numerical method for solving Serre-Green-Naghdi equations describing long free surface gravity waves DOI: 10.1088/1361-6544/aa712d
  • Busto, Dumbser, Escalante, Favrie, and Gavrilyuk. On High Order ADER Discontinuous Galerkin Schemes for First Order Hyperbolic Reformulations of Nonlinear Dispersive Systems DOI: 10.1007/s10915-021-01429-8

The semidiscretization implemented here conserves

  • the total water mass (integral of $h$) as a linear invariant
  • the total modified energy

for periodic boundary conditions (see Ranocha and Ricchiuto (2024)). Additionally, it is well-balanced for the lake-at-rest stationary solution, see

  • Hendrik Ranocha and Mario Ricchiuto (2024) Structure-preserving approximations of the Serre-Green-Naghdi equations in standard and hyperbolic form arXiv: 2408.02665
source