ErinSam / Second-Order-Semidiscrete-Central-Upwind-Scheme

Code for second order semidiscrete central upwind schemes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Second-Order-Semidiscrete-Central-Upwind-Scheme

The second-order semidiscrete central-upwind scheme is used to model compressible flow systems. The equations governing the flow are the equation of mass conservation, energy conservation and the compressible Euler Equations.

An OpenMP parallelized numerical framework written in C++, controlled through simple Python scripts by the use of pybind11, is in use to implement the semidiscrete central-upwind scheme. The implementation is tested through a number of classic examples with known solutions.

The current form of the code is only featured for uniform, quadrilateral cells, with zero gradient boundary conditions.

Usage

Build Instructions

Clone the GitHub repository

git clone https://github.com/ErinSam/Second-Order-Semidiscrete-Central-Upwind-Scheme.git

Create the shared library

make

Running a configuration

To run the simulation, excecute run.sh with appropriate variables

./run.sh var1 var2 var3 var4 var5 var6

where,
var1: number of mesh cells
var2: dx, the size of each finite volume mesh cell
var3: dt, the size of a single time step
var4: the number of time steps for the simulation
var5: save frequency
An example for 200x200 mesh, with dx = 0.0025, dt = 0.000025, numIterations = 125000, save frequency = 20

./run.sh 200 0.0025 0.000025 125000 20

Post Processing

View the latest data with an interactive 3D plot

make plotLastest

Save density charts (distribution, surface plot, contour plot) for all the data saved

make saveAll

All the saved data is stored in the ./data/ directory and images in the ./data/img/. To change the location of the saved data, make appropriate changes to ./bin/postProcess.py

Benchmarking

Numerical Experiments

Configuration 6

References

[1] Alexander Kurganov; Eitan Tadmor (2002). Solution of two-dimensional Riemann problems for gas dynamics without Riemann problem solvers. , 18(5), 584–608.
[2] Kurganov, Alexander; Noelle, Sebastian; Petrova, Guergana (2001). Semidiscrete Central-Upwind Schemes for Hyperbolic Conservation Laws and Hamilton--Jacobi Equations. SIAM Journal on Scientific Computing., 23(3), 707–740.

About

Code for second order semidiscrete central upwind schemes.

License:GNU General Public License v3.0


Languages

Language:C++ 99.7%Language:C 0.2%Language:Python 0.1%Language:Makefile 0.0%Language:CMake 0.0%Language:Objective-C 0.0%