View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
1D Shallow Water Equations Dam Break

5.0 | 1 rating Rate this file 23 Downloads (last 30 days) File Size: 13.8 KB File ID: #46475 Version: 1.0
image thumbnail

1D Shallow Water Equations Dam Break


James Adams (view profile)


04 May 2014 (Updated )

Solves the 1D Shallow Water Equations for a Dam Break scenario

| Watch this File

File Information

Solves the 1D Shallow Water equations using a choice of four finite difference schemes (Lax-Friedrichs, Lax-Wendroff, MacCormack and Adams Average). The Adams Average scheme was devised by myself (James Adams) in 2014.
Uses Dam Break conditions (initial water velocity is set to zero).

A choice of either zero gradient (water flows out of the domain) or reflective boundary conditions is given.

Plots both the water height and velocity at each iteration.

A heuristic time step is used. The simulation is halted if the time step becomes too small.

Plots a graph of the time step values once the simulation has finished.

MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
30 Jan 2017 A T

A T (view profile)

where can i change the height of the initial calculation .....

Comment only
18 Jun 2015 Basheer

well done, did you work on finite volume method?

Comment only
01 Dec 2014 hamed

hamed (view profile)

Great code dear James,
Is it possible to show some parameters used in your code schematically?
specially for left/right boundary, damwall,...

Contact us