When solving the shallow water equations, da is an identity matrix,
w is the vector of conservative variables,
Γ represents the conservative fluxes, and
f includes the source terms:
Here, Γh and
Γq represent the fluxes of the continuity and momentum equations, respectively.
After discretization in space, the system of equations is integrated in time. The standard procedure is to use an explicit Runge-Kutta method. The physics interface uses the third-order SSP (strong stability preserving) Runge–Kutta method per default.
The time step in explicit computations is limited by the CFL condition; see Time Explicit Integrator in the
COMSOL Multiphysics Reference Manual. The maximum stable time step is proportional to the smallest mesh element size
h and inversely proportional to the maximum wave speed in the domain. On unstructured meshes with local refinement regions only a few elements are small, yet these dictate the overall time step for the whole problem. In such cases, the use of
Local Time Stepping is advisable. COMSOL Multiphysics provides the
Adams-Bashforth 3 (local) time stepping method.
The bottom topography hb is entered as a user-defined expression. In order to ensure that its gradient can be evaluated and is constant on every element, it is first projected onto the variable
swe.hb_linear using linear Lagrangian shape functions. For plotting purposes, the provided expression for
hb is also projected onto the variable
swe.hb_constant using the same piecewise discontinuous shape functions as for
h. These projections are done in a Stationary study step that must be computed before the Time Dependent study step is used to compute the shallow water equations. When starting a new model from the
Model Wizard, the stationary study step is added per default when selecting a Time Dependent study.