Skip to content

A simple shallow water equation simulation in MATLAB.

Notifications You must be signed in to change notification settings

DamynChipman/ShallowWater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple shallow water equation simulation in MATLAB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages