Skip to content

Add Sod shock tube tutorial to the tutorial regression tests - #3057

Open
PraptiPatra wants to merge 4 commits into
su2code:developfrom
PraptiPatra:feature/sod-tutorial-regression
Open

PraptiPatra wants to merge 4 commits into
su2code:developfrom
PraptiPatra:feature/sod-tutorial-regression

Conversation

@PraptiPatra

Copy link
Copy Markdown

Proposed Changes

Adds the new Sod shock tube tutorial to the tutorial regression tests in TestCases/tutorials.py, as requested in su2code/Tutorials#91.

The test runs the full case (1000 explicit time steps, about 1.4 s with mpirun -n 2) and checks the physical time and the density RMS residual at the last step. I checked the values locally with TestCase.run_test() on 2 ranks; they are identical to a serial run.

Note: the regression workflow checks out the Tutorials repository at develop, so the tutorials.py job will fail until su2code/Tutorials#91 is merged.

Related Work

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (no C++ changes).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

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.
Fixes the four CodeFactor E221 warnings (multiple spaces before operator).
No change in behaviour.
@PraptiPatra
PraptiPatra force-pushed the feature/sod-tutorial-regression branch from 6ad3d0c to 05cf422 Compare December 3, 2026 05:44
@bigfooted

Copy link
Copy Markdown
Contributor

Thanks, please use 10 timesteps and a restart file, the restart file goes into the Testcases repository.

The restart at time step 990 goes in the TestCases repository
(tutorials/sod_shock_tube/solution_flow_00990.csv). The density residual at
step 1000 is the same as for the full run from the initial condition.
@PraptiPatra

Copy link
Copy Markdown
Author

Thanks! Done @bigfooted. The test now restarts from time step 990 and runs the last 10 steps to t_end.

The restart file is in su2code/TestCases#221 under tutorials/sod_shock_tube/.

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
@PraptiPatra

Copy link
Copy Markdown
Author

Update: following the discussion in su2code/TestCases#221, the restart file at step 990 is now in the tutorial folder (su2code/Tutorials#91) and not in TestCases. The test reads it from there, so the only config change it makes is RESTART_ITER= 991. The test values are unchanged: 0.000006, -2.501790. Tutorials#91 needs to be merged first, because CI uses the Tutorials develop branch.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants