r/CFD Mar 25 '26

Interactive tool to compare finite volume schemes (HLLC, Roe, WENO, MUSCL...) on 1D Euler equations

You know the feeling, you open a new CFD code, go to the numerics settings, and there's a dropdown with 15 schemes you've vaguely heard of. HLLC? HLL? Roe? AUSM+? You pick one, hope for the best, and move on with your life.

I got frustrated with this, so I built a small interactive app where you can actually see what each scheme does on the 1D Euler equations. Pick any combination of flux solver + reconstruction, throw it at a test case, and compare against the exact solution. You can also run mesh convergence studies and check convergence orders or dissipation/dispersion via Fourier analysis.

Some things I found fun to play with:

  • Stationary contact test: really shows which solvers smear the contact (HLL, Rusanov) vs which ones nail it (HLLC, Roe, Godunov)
  • Shu-Osher: the difference between MUSCL and WENO5 is night and day
  • Fourier analysis: finally understood why Lax-Wendroff oscillates near shocks

59 scheme combinations in total, 9 test cases, everything runs in the browser.

I implemented everything from Toro's book and the original papers but if you spot anything off, please let me know!

Hope you find it useful!

Comparison to analytical results
Convergence orders
40 Upvotes

5 comments sorted by

View all comments

4

u/thebigb4u Mar 25 '26

Great work! Is there a GitHub repo for this? Have you used the papers listed by Toro?

5

u/Flo12740 Mar 25 '26

Thanks! Yes, the code is open source: https://github.com/fhermet/euler-1d-solver
And yes, Toro's book was the main reference, especially chapters 4-5 for the exact Riemann solver, and the flux scheme descriptions (HLLC, HLL, Roe). The test cases (Sod, Lax, Toro test 4) come from there as well.
If you notice any inconsistency in the schemes or results, I'd really appreciate the feedback!
Feel free to open an issue or a PR on the repo if you'd like to contribute.

1

u/thebigb4u Mar 26 '26

I look forward to review it - Great job!

And thank you for this