2D shallow water equations implemented in Julia and compiled to WASM.
The surface elevation as governed by the 2D shallow water equations. The area represents a water body of km x km with a constant depth of m. Use the mouse to change and add obstacles in the flow field.
Things to try:
- Draw some shapes
- Increase time step (when the model becomes unstable, you need to reload the page to restart the simulation)
- Change the acceleration due to gravity
- Use a negative time-step
- Note that the model can become unstable of the once the CFL conditions are not satisfied.
- A typical value of the Coriolis parameter on Earth is 0.0001 s⁻¹.
More information and the code is available here.