Skip to content

Add Sod shock tube tutorial page - #237

Open
PraptiPatra wants to merge 3 commits into
su2code:developfrom
PraptiPatra:feature/sod-shock-tube
Open

PraptiPatra wants to merge 3 commits into
su2code:developfrom
PraptiPatra:feature/sod-shock-tube

Conversation

@PraptiPatra

Copy link
Copy Markdown

Proposed Changes

  • Adds a new compressible-flow tutorial page, _tutorials/compressible_flow/Sod_Shock_Tube/Sod_Shock_Tube.md, listed after Inviscid_Wedge in _data/tutorials.yml.
  • Adds six figures in tutorials_files/compressible_flow/Sod_Shock_Tube/images/.

The tutorial solves the Sod shock tube with the compressible Euler solver and verifies the result against the exact Riemann solution. It covers:

  • setting a discontinuous initial condition through an ASCII restart file,
  • explicit time stepping with a fixed time step and the CFL condition,
  • a comparison of convective schemes (ROE, HLLC, AUSM, SLAU2, JST), slope limiters, and first- vs second-order reconstruction,
  • a mesh-convergence study (100 to 1600 cells), explaining why the observed order is below the design order for a solution with discontinuities.

One finding may be of wider interest: plain VENKATAKRISHNAN uses a fixed threshold ε² = (K · 1 m)³, which is negligible in a dimensional simulation. With HLLC or AUSM this produces an odd-even sawtooth behind the rarefaction tail that grows with mesh refinement, while VENKATAKRISHNAN_WANG, whose threshold scales with the range of each variable, removes it. The page therefore uses VENKATAKRISHNAN_WANG. If useful, a short note about this could also be added to config_template.cfg.

Related Work

New compressible-flow tutorial: unsteady Sod shock tube verified against
the exact Riemann solution. Covers setting a discontinuous initial
condition through an ASCII restart file, explicit time stepping and the
CFL condition, and a comparison of convective schemes, slope limiters
and mesh convergence, including the effect of the Venkatakrishnan
limiter threshold in dimensional simulations.

Case files: su2code/Tutorials, compressible_flow/Sod_Shock_Tube.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bigfooted

Copy link
Copy Markdown
Contributor

thanks, can you add a picture of the setup and mesh and a contour plot of a solution?

PraptiPatra and others added 2 commits December 5, 2026 13:19
- Figure 2: sketch of the tube with the initial states, the diaphragm
  and the boundary markers.
- Figure 3: the whole 400 x 1 mesh and a close-up of the cells around
  the diaphragm.
- Figure 4: density contours on the strip at t_end and in the x-t plane,
  with the exact wave paths.

The figures are made by plot_overview.py in the tutorial folder. The
later figures are renumbered 5 to 9, and the resources section lists
plot_overview.py and the regression restart file solution_flow_00990.csv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FTVvXsobGthJWp6eFiG4HC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FTVvXsobGthJWp6eFiG4HC
@PraptiPatra

Copy link
Copy Markdown
Author
image image image
  • Figure 1: a sketch of the setup, with the two initial states, the diaphragm at x = 0.5 m and the boundary markers (Euler walls at the ends, symmetry on the sides).
  • Figure 2: the mesh. It shows the whole 400 x 1 strip (stretched in y so it is visible) and a close-up of the cells around the diaphragm at the true aspect ratio.
  • Figure 3: density contours from the SU2 solution. One shows the strip at t_end, and one shows the density in the x-t plane with the exact paths of the rarefaction head and tail, the contact and the shock drawn on top. The computed waves follow the exact paths at all times.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants