Repository navigation
Add Sod shock tube tutorial case - #91
Open
PraptiPatra wants to merge 2 commits into
Open
PraptiPatra wants to merge 2 commits into
PraptiPatra wants to merge 2 commits into
Conversation
Unsteady 1D Riemann problem (Sod 1978) solved with the compressible Euler solver on a one-cell-high strip, with explicit Runge-Kutta time stepping and ROE + MUSCL + Venkatakrishnan-Wang. - sod.cfg, sod_400.su2: configuration and 400-cell mesh - solution_flow_00000.csv: discontinuous initial condition as an ASCII restart file (SU2 has no config option for a two-state initial state) - make_mesh.py, make_ic.py: regenerate the mesh and initial condition - compare_exact.py: exact Riemann solution and L1 density error - run_study.py, plot_study.py: scheme, limiter and mesh-convergence study Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bigfooted
approved these changes
Dec 2, 2026
Contributor
Yes, please add it to the tutorial regression tests. When that PR is up, we can merge this one and couple it together. |
6 tasks done
Author
|
Thanks for the review! I've opened [su2code/SU2#3057 · Add Sod shock tube tutorial to…], which adds the case to TestCases/tutorials.py. It runs the full 1000 time steps (about 1.4 s on 2 ranks) and checks the final density residual; I verified it locally with the regression harness. |
PraptiPatra
added a commit
to PraptiPatra/SU2
that referenced
this pull request
Dec 3, 2026
Adds the Sod shock tube case (su2code/Tutorials#91) to TestCases/tutorials.py. The test runs the full 1000 explicit time steps (about 1.4 s on 2 ranks) and checks the physical time and the density RMS residual at the last step.
- solution_flow_00990.csv: the solution at time step 990, used by the sod_shock_tube_tutorial regression test in SU2 (TestCases/tutorials.py), which runs the last 10 time steps from it. It was first proposed for the TestCases repository (su2code/TestCases#221), but tutorial restart files go in the tutorial folder. - plot_overview.py: draws the setup sketch, the mesh, and the density contours on the strip and in the x-t plane for the tutorial page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FTVvXsobGthJWp6eFiG4HC
PraptiPatra
added a commit
to PraptiPatra/SU2
that referenced
this pull request
Dec 5, 2026
The restart at time step 990 is now in the Tutorials repository, next to sod.cfg (su2code/Tutorials#91), instead of in TestCases. The test config only needs RESTART_ITER= 991; SOLUTION_FILENAME stays as in sod.cfg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FTVvXsobGthJWp6eFiG4HC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
compressible_flow/Sod_Shock_Tube/for the Sod shock tube problem (unsteady 1D Riemann problem).VENKATAKRISHNAN_WANGlimiter).solution_flow_00000.csv) containing the piecewise-constant initial condition, since the two initial states cannot be specified directly through the configuration file.make_mesh.py,make_ic.py), compute the exact solution and the error (compare_exact.py), and reproduce the scheme, limiter and mesh-convergence studies shown on the tutorial page (run_study.py,plot_study.py).The case runs in a few seconds and matches the exact solution closely, with a density L1 error of 2.16 × 10⁻³ kg/m² on the 400-cell mesh.
Related Work
Since
TestCases/tutorials.pyruns the tutorials in SU2's CI, I'm happy to open a follow-up PR in su2code/SU2 adding a regression entry for this case if that would be useful.