This project implements a numerical solver for the shallow water equations (SWE) using the finite difference method (FDM). It's designed for simulating fluid dynamics in thin layers, applicable in studying phenomena like tsunamis, tidal waves, and atmospheric flows over large scales.
The solver simulates the SWE set, focusing on momentum equations and mass conservation:
- Momentum Equations:
- Mass Conservation:
Initial conditions must be specified for fluid velocity and surface elevation at the start of the simulation. The solver supports various boundary conditions to model different physical scenarios accurately:
The pressure is zero along the free surface, and the vertical displacement of the free surface is given by the kinematic boundary condition:
Under the assumption of hydrostatic balance, the momentum equation is simplified to:
Fluid incompressibility is represented by the divergence-free condition for the velocity field:
The impermeable bottom boundary is modeled by the no-flow-through condition:
Here, p
is the pressure, η
the vertical displacement of free surface, u = (u, v, w)
the three-dimensional velocity, ρ
the density, g
the acceleration due to gravity, and h(x, y)
the bottom topography.
The project uses spatial discretization via the finite difference method and explicit time-stepping. Stability is maintained by adhering to the Courant-Friedrichs-Lewy (CFL) condition.