Giter Club home page Giter Club logo

swmone's Introduction

swmone - An MPI-parallelised shallow water model in 1D.

wave

Swmone is a fully-explicit finite difference non-linear shallow water model on a staggered grid, which is parallelised using domain decomposition and ghost-point communication via Julia's MPI wrapper. The 1D shallow water equations are

      ∂u/∂t = -u*∂u/∂x -g*∂η/∂x + ν∂²u/∂x² + F(x,t)   (1)
      ∂η/∂t = -∂(uh)/∂x.                              (2)

The terms on the right-hand side of (1) are non-linear advection, pressure gradient, viscosity and forcing. The layer thickness is h = η + H, with H being constant. Equation (1) is solved in the "vector invariant" form

      ∂u/∂t = ∂/∂x(-1/2*u² - g*η + ν∂u/∂x) + F(x,t)

with a Runge-Kutta 4th order time integration and 2nd order centred gradients and interpolations in space.

Domain decomposition

The domain of N grid points is split into chunks of equal size, which will be computed by individual processes separately. Each sub-domain is extend to the left and to the right with ghost points. Before every evaluation of the right-hand side the ghost points are updated via MPI.send/MPI.receive calls from adjacent processes. Only in the end a MPI.gather is executed to retrieve data from all sub-domains. Optional plotting with PyPlot (animation via updated figure).

Documentation

There's a blog article, describing the model, the domain decomposition and the parallelization.

Requirements

MPI and PyPlot

swmone's People

Contributors

milankl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.