One-dimensional solver for the compressible Euler equations, written in Python. Multiple Riemann solvers (HLLC, Flux Vector Splitting) are implemented, based on [1]. The spatial scheme can be of order 1 (piecewise constant) or 2 (MUSCL-Hancok scheme with linear reconstruction). A minmod limiter is also avaible.
The test script implements the classical Sod shock tube problem, with reflective or transmissive boundaries.
Here is a comparison of the density field at t=0.01s, for the analytical solution and for the simulation with 100 cells, order 2 reconstruction and Flux Vector Splitting:
Some fancy visualizations can be obtained with this code, for example the following wave diagrams, for a shock tube with reflective boundaries (1000 uniform cells):
References: [1] "Riemann Solvers and Numerical Methods for Fluid Dynamics, A Practical Introduction" by Toro, Eleuterio F., Springer
TODO: quasi-1D version