Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 1013 Bytes

README.md

File metadata and controls

33 lines (19 loc) · 1013 Bytes

ShallowWater

A simple shallow water equation simulation in MATLAB.

Overview

The Shallow Water Equations (SWE) model depth averaged flow over large distances. The word "shallow" comes from the ratio of distance traveled over depth. The SWE are used to model physical waves like tsunamis or debris flow.

This repo contains a single main file, a Mesh class file, and a few function files, all written in MATLAB.

Alt Text

The Model

Wikipedia: Shallow Water Equations

Installation

Simple clone and run:

git clone https://github.com/DamynChipman/ShallowWater.git

Usage

Open in MATLAB and run the main.m file, or via command line:

matlab main.m

By default, the code generates a 2D, unstructured triangle mesh on a rectangular domain, builds the initial condition (combination of a bunch of Gaussians), and steps in time until the final time. The boundary conditions are all reflective.