Skip to content

One-dimensional solver for the Euler equation, with multiple Riemann solvers (HLLC, Flux Vector Splitting).

Notifications You must be signed in to change notification settings

laurent90git/CFD_Euler_1D

Repository files navigation

One-dimensional adaptive solver for the compressible Euler equations

Solver with adaptive mesh refinement 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-Hancock scheme with linear reconstruction). A minmod limiter is also avaible. The temporal integration is either first-order (Explicit Euler), third-order (SSP Runge-Kutta method), or any of Scip's 'solve_ivp' methods. Dynamic time step is available (either via error estimates with Scipy or via a CFL condition).

A tree-based dynamic refinement algorithm is implemented. Various refinement criteria are available: error estimate of the spatial discretisation, classical "gradient" of some variables...

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:

comparison

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):

schlieren T_field

Here is a similar test case, with adaptive mesh refinement:

density schlieren mesh levels mesh size

References: [1] "Riemann Solvers and Numerical Methods for Fluid Dynamics, A Practical Introduction" by Toro, Eleuterio F., Springer

TODO: quasi-1D version

About

One-dimensional solver for the Euler equation, with multiple Riemann solvers (HLLC, Flux Vector Splitting).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages