Git Product home page Git Product logo

higher_order_cweno_boundary_treatment's Introduction

higher_order_CWENO_boundary_treatment

Two dimensional shallow water equation

Motivation

This repository provides a numpy-based implementation of a one-sided higher order polynomial reconstruction algorithm based on so called central weighted essentially non-oscillatory (CWENO) reconstructions.

It is based on the work NAUMANN, Alexander; KOLB, Oliver; SEMPLICE, Matteo. On a third order CWENO boundary treatment with application to networks of hyperbolic conservation laws. Applied Mathematics and Computation, 2018, 325. Jg., S. 252-270. and takes the presented one dimensional 3rd order approach to higher orders of 5 and 7. It also provides two dimensional implementations by applying the one dimensional approach independently in each dimension.

Applications

Such reconstruction algorithms can for example be used to construct high-order Finite Volume schemes to solve systems of balance laws or conservation laws. Those arise from a variety of physical phenomena.

To assist with such applications, the repository implements explicit Runge-Kutta time integrators of order 3, 5, and 7 as well as methods to semi-discretize in spatial dimensions.

You can find a jupyter notebook show-casing the application to solve an initial value problem for shallow water equations in examples.

Contributing

Contributions are always welcome. You can either pick an existing issue or create a new one.

In order to work on an issue just fork the repository and open a pull request once ready. Generally that means:

  • all tests pass and
  • if new functionality is added, corresponding tests are part of the pull request.

Development setup & running tests

In order to run tests locally you can run

pip install -r requirements.txt -r test-requirements.txt
pip install -e .

from the source directory to first install all requirements and setup the repository in editable mode. If you prefer conda over pip use the equivalent commands to achieve the same.

If everything worked fine, you can run tests using pytest:

pytest tests/

Code formatting

I use ruff for code formatting. To automatically run ruff whenever you commit a change install the provided pre-commit hooks by running

pre-commit install

Afterwards you can also manually format the code executing for example

pre-commit run --all-files

higher_order_cweno_boundary_treatment's People

Contributors

svoons avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

stefan-endres

higher_order_cweno_boundary_treatment's Issues

Add proper docstrings

At least

  • the CWENO classes (uniform_CWENO_1/2D.py) and

  • functions in semi_discretization.py should have some explanatory docstrings.

  • Runge-Kutta integrators could use references

Provide example(s) on how to use reconstructions

In order to make the code speak more for itself, add some examples like

  • what exactly are the reconstructions doing (with some visualisations)
  • how to solve 1D linear transport equation with RK time stepping and CWENO reconstructions

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.