jostbr / shallow-water

Python model solving the shallow water equations (linear momentum, nonlinear continuity)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shallow water equations

Model solving the 2D shallow water equations. The momentum equations are linearized while the continuity equation is solved non-linearly. The model was developed as part of the "Bornö Summer School in Ocean Dynamics" partly to study theory evolve in a numerical simulation. Visualizations scripts are also provided.

As it is set up right now, the model initates with a large gaussian bump resulting in waves propagate away from the bump, then interacts with the walls (no flow condition). The solution for the surface elevation and velocity fields can be seen below:

Surface elevation solution Velocity field solution

Feel free to play around with the parameters to your liking. You might have to make some tweeks to the colorscale and arrowscale for some of the plots if you change some parameters.

About

Python model solving the shallow water equations (linear momentum, nonlinear continuity)


Languages

Language:Python 100.0%