Code Monkey home page Code Monkey logo

2dlinconv's Introduction

2Dlinconv

A 2D linear convection solver using Summation-By-Parts (SBP) discretization methods written in MATLAB.

SBP methods are very similar to Discontinuous Galerkin (DG) finite-element methods. This solver uses upwind numerical fluxes to add dissipation at element interfaces and the fourth-order Runge-Kutta (RK4) method as its time-marching scheme.

For the grid generation, DistMesh is used.

Installation

Clone the repository:

git clone https://github.com/siavashadpey/2Dlinconv.git

Open MATLAB and cd into the directory you just cloned and run the setup file on MATLAB's Command Window:

setup

Example

You can run a pre-existing test case via the Command Window:

lin_conv_2D

which simulates a 2D sinusoidal wave convecting at a constant speed of 0.5 in each direction on a unit square until a final time of T=0.5. The mesh spacing used is 1/12, the time-step is 0.005, and the SBP operator is an Omega operator of degree 3.

The numerical and exact solutions are shown below:

Via this driver file's arguments, you can modify the type and the degree of the SBP operator, the type of linear convection problem, the wave speed, and the mesh spacing and time-step.

Finally, you can also run convergence studies to test the solver by executing:

conv_study

2dlinconv's People

Contributors

siavashadpey avatar

Watchers

 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.