Shallow Water Equation #
For the purpose of flood routing and two-dimensional surface water flow hydraulic modeling, a set of equations derived from the Navier–Stokes equations under certain assumptions is considered. These are known as the Shallow Water Equations (SWEs).
The shallow water equations — whose one-dimensional form is also known as the Saint-Venant equations — comprise a set of hyperbolic partial differential equations (or parabolic, if viscous shear stress is considered) that describe pressurized flow in a fluid. These equations are depth-integrated forms of the Navier–Stokes equations, derived under the assumption that the horizontal length scale is significantly larger than the vertical scale.

In these equations:
- x represents the horizontal direction,
- y represents the vertical direction,
- t is time,
- h is the water depth,
- qx is the unit-width discharge (flow per unit width) in the x-direction,
- qy is the unit-width discharge in the y-direction,
- ∥q∥ is the magnitude of the discharge vector resulting from qx and qy,
- u is the flow velocity in the x-direction,
- v is the flow velocity in the y-direction,
- z is the bed elevation,
- g is the gravitational acceleration, and
- n is the Manning’s roughness coefficient.
Shallow Water Equation with Local Inertia Approximation #
The key to simplifying the full dynamic shallow water equation system and obtaining the shallow water equations with the Local Inertia Approximation lies in the assumption that the convective acceleration terms in the momentum equations are negligible compared to the other terms. Therefore, in subcritical flows, these convective terms can be ignored. The resulting simplified equations—known as the Local Inertia Approximation—are expressed by these relations. (De Almeida et al., 2013).

The momentum equations of the shallow water system with the Local Inertia Approximation can be solved using explicit, semi-implicit, or implicit schemes. In the implicit and semi-implicit approaches, unknown values from the next time step are used instead of known values from the current time step. This improves the accuracy of the computed unknowns and enhances the numerical stability of the solution. As a result, larger time steps can be used in modeling, and the total simulation runtime is reduced compared to the explicit method.
Unlike most differential equations, solving the shallow water equations with the local inertia approximation using implicit or semi-implicit methods is not computationally complex. The unknowns can still be computed in a time-marching manner similar to the explicit approach, and there is no need for iterative techniques or solving nonlinear systems of equations such as the Newton method. This significantly reduces the computational time required for simulations based on this equation set.
An important note is that the distinction between explicit, semi-implicit, and implicit formulations lies in the treatment of the friction term in the momentum equations, which can be expressed separately as shown below.

To enhance the stability of the solution, this software employs a q-centered numerical scheme. In this scheme, Theta (θ) is a coefficient that defines the weighting between upstream and downstream flows, and it can be adjusted by the user based on their preference. (De Almeida et al., 2012).
The numerical stability condition for the time step in computations, based on the Courant–Friedrichs–Lewy (CFL) criterion, is given by the following equation:

In this equation, Δt is the time step of the finite difference method, hmax is the maximum water depth within the computational domain, and α is a stability adjustment coefficient that can be set by the user in this software. This relation is used in the software to dynamically adjust the time step throughout the simulation.
Diffusion Wave Equation #

