Coder Social home page Coder Social logo

carlosal1015 / advectionsolver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michaelschoellhorn/advectionsolver

0.0 0.0 0.0 1.37 MB

A numeric code to solve the 1D advection equation using different slope limiter schemes.

C++ 88.67% Python 9.62% CMake 1.71%

advectionsolver's Introduction

AdvectionSolver

This code solves the 1D advection equation using a finite volume approach. It uses different numerical methods to approximate the flux between cells. It is meant as a showcase of the methods involved and should not be seen as a ready-to-use code for numerical simulation of physical systems described via the 1D adv. eq.

Features

-Switching between different Slope- and Fluxlimiters to get an easy side to side comparison of the methods used.

-Adjustments of simulation parameters like gridsize and courant number to see their effect on the quality of the solution.

-Periodic boundary conditions

-Custom initial conditions q(t=0, x) or a test problem that includes discontinuities as well as a wave.

Slope- and Fluxlimiters

  1. Simple Upwind
  2. Lax-Wendroff
  3. Beam-Warming
  4. Fromm
  5. MinMod
  6. SuperBee
  7. MC
  8. VanLeer

Code Manual

There are three parts to this program. createDist.cpp stands on it's own and can generate a customDistribution as the initial condition for the solver.

The main simulation uses CMake to build. It includes the main.cpp aswell as the headers and source files in include/ and src/. After compilation and execution of the binary, the resulting simulation data can be found in the data dir.

Now plotting.py can be run. This generates plots of the numerical versus the analytical solution in the results directory.

advectionsolver's People

Contributors

carlosal1015 avatar michaelschoellhorn 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.