Fix unsteady testcase configs and add regression tests#2755
Fix unsteady testcase configs and add regression tests#2755Sahilll10 wants to merge 5 commits intosu2code:developfrom
Conversation
- Add TIME_DOMAIN=YES and TIME_ITER=100 to three unsteady configs that were silent running as single steady iterations - Fix SOLVER=RANS in turb_NACA64A010.cfg - Remove deprecated EXT_ITER from all three configs - Add SCREEN_OUTPUT to all three configs for regression output - Register pitching_naca64a010_rans, pitching_naca64a010_euler, and plunging_naca0012 in serial_regression.py Fixes su2code#2524
|
Thanks @bigfooted for merging develop in and adding the label. I've synced locally and the branch looks clean on my end too. Happy to address any review comments if anything comes up. Please let me know if there's anything else needed to get this across the line. |
|
Your changes are doing 2 timesteps with 2000 inner iterations each. |
|
I havee been working on the restart files now, wanted to share progress and ask a couple of questions before I finalize. I ran all three cases locally for the full 100 time steps with Following the pattern of
Two questions before I proceed:
Happy to re-run everything at full quality if needed . Please confirm the approach before i commit files to the TestCases repo. |
|
Show us what the solution and time history of coefficients looks like. |
|
Hi @pcarruscag Here are the time histories of CL and CD for all three cases.
For the restart files, my plan remains as described in the previous comment — rename the last two files of each completed run to solution_flow_00000.csv and solution_flow_00001.csv following the square_cylinder pattern. Happy to proceed once you confirm this approach is acceptable. |
Does it? What do the inner iterations do to enhance transient decay? I think you're doing a great job here with validation, but I also think it is important that you understand what you are really doing so you can make knowledge based decisions. Ask chatgpt or whatever, but analyze the feedback/results yourself. |
|
100's of inner iterations per time step is not an acceptable configuration, you need to tweak the CFL and linear solver settings such that the relative residuals in each time step drop 3 orders of magnitude in about 20 iterations. |
Hi @bigfooted Inner iterations have nothing to do with how fast the physical transient decays. That was a wrong statement on my part. The physical transient — how quickly CL settles into a periodic oscillation — depends entirely on the flow conditions and how many real time steps have passed. What actually happened in my plot: The actual effect of dropping from 2000 to 300 inner iterations shows up in the residual: with 300 inner iters the density residual reaches about -4.6 per time step, versus -6.8 with 2000. Sorry for the sloppy explanation earlier. I will make sure I explain each thing before asking for review. |
Hi @pcarruscag I tried tuning the settings and want to show you the numbers before going further. Drop in 20 iterations: ~0.95 orders After (CFL=200, ILU, LINEAR_SOLVER_ITER=20): Drop in 20 iterations: ~2.13 orders This is a significant improvement but still short of your 3 orders in 20 target. Could you point me toward what else I should adjust to close that remaining gap? |
|
That's good enough |
|
Can you now update the regression tests with these settings? |
- Reduce INNER_ITER from 2000/110/1000 to 30/20/50 for RANS/Euler/Plunging - Switch LINEAR_SOLVER_PREC from LU_SGS to ILU for faster convergence - Raise CFL from 4/10 to 200 for RANS and Euler cases - These settings achieve ~2 orders residual drop in 20 inner iterations for RANS and Euler, consistent with pcarruscag review feedback
- RANS: CFL=200, INNER_ITER=30 - Euler: CFL=200, INNER_ITER=20 - Plunging: CFL=1.0, INNER_ITER=50 - test_vals regenerated from clean run with new settings
There was a problem hiding this comment.
Pull request overview
This PR fixes several unsteady SU2 testcase configurations so they actually run in time-accurate mode (instead of silently behaving like steady runs), and adds them to the serial regression suite to prevent future regressions (per #2524).
Changes:
- Add missing unsteady controls (
TIME_DOMAIN=YES,TIME_ITER) and remove deprecatedEXT_ITERin three unsteady testcase cfgs. - Correct solver selection for the SA turbulent case (
SOLVER=RANS) and addSCREEN_OUTPUTfields needed for regression parsing. - Register the three cases in
TestCases/serial_regression.pyas CI regression tests (unsteady=True,test_iter=1).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
TestCases/unsteady/plunging_naca0012/plunging_NACA0012.cfg |
Enables true unsteady stepping + adjusts output; also changes some solver/runtime knobs. |
TestCases/unsteady/pitching_naca64a010_rans/turb_NACA64A010.cfg |
Fixes solver type for SA RANS + enables unsteady stepping/output; also changes some solver/runtime knobs. |
TestCases/unsteady/pitching_naca64a010_euler/pitching_NACA64A010.cfg |
Enables unsteady stepping/output; also changes some solver/runtime knobs. |
TestCases/serial_regression.py |
Adds three new unsteady regression entries so these cases are exercised in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| % | ||
| NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES | ||
| CFL_NUMBER= 10.0 | ||
| CFL_NUMBER= 200.0 |
There was a problem hiding this comment.
CFL_NUMBER is increased from 10.0 to 200.0. This is a significant numerical change and isn’t described in the PR summary; please confirm it’s intentional for this testcase and consider adding a short note in the cfg explaining the choice.
| % | ||
| LINEAR_SOLVER= FGMRES | ||
| LINEAR_SOLVER_PREC= LU_SGS | ||
| LINEAR_SOLVER_PREC= ILU |
There was a problem hiding this comment.
This changes LINEAR_SOLVER_PREC from LU_SGS to ILU without being mentioned in the PR description. Please confirm this is intentional and add a brief rationale, since it changes the testcase’s solver configuration beyond the unsteady fix.
| % 10 periods: 0.5888756403287397 | ||
| % | ||
| INNER_ITER= 1000 | ||
| INNER_ITER= 50 |
There was a problem hiding this comment.
This config change includes runtime/solver-setup modifications beyond the PR description: INNER_ITER is reduced from 1000 to 50. Please confirm this is intentional for the regression/CI version of the case and add a brief rationale (or keep the original value if the intent is only to fix missing unsteady keys).
| % | ||
| LINEAR_SOLVER= FGMRES | ||
| LINEAR_SOLVER_PREC= LU_SGS | ||
| LINEAR_SOLVER_PREC= ILU |
There was a problem hiding this comment.
This PR also changes the linear solver preconditioner from LU_SGS to ILU, which is not mentioned in the PR description. If this is meant to improve robustness/speed for CI, please document it; otherwise consider reverting to avoid altering the numerical setup beyond the unsteady fix.
| TIME_DOMAIN= YES | ||
| TIME_ITER= 100 | ||
| INNER_ITER= 30 |
There was a problem hiding this comment.
In addition to the unsteady keys, this hunk changes INNER_ITER from 2000 to 30. Since the PR description focuses on TIME_DOMAIN/TIME_ITER/EXT_ITER + solver selection, please confirm the INNER_ITER reduction is intentional and note the motivation (e.g., CI runtime) to avoid surprising changes to the case definition.
| % | ||
| NUM_METHOD_GRAD= GREEN_GAUSS | ||
| CFL_NUMBER= 4.0 | ||
| CFL_NUMBER= 200.0 |
There was a problem hiding this comment.
CFL_NUMBER is increased from 4.0 to 200.0. This is a substantial numerical change and isn't called out in the PR description; please confirm it is required/intentional for this testcase (and ideally leave a short in-file comment explaining why this value is appropriate).
| % | ||
| LINEAR_SOLVER= FGMRES | ||
| LINEAR_SOLVER_PREC= LU_SGS | ||
| LINEAR_SOLVER_PREC= ILU |
There was a problem hiding this comment.
This changes LINEAR_SOLVER_PREC from LU_SGS to ILU without any note in the PR description. Please confirm this is intentional and document the rationale, since it can affect convergence and performance characteristics of the testcase.
| TIME_DOMAIN= YES | ||
| TIME_ITER= 100 | ||
| INNER_ITER= 20 |
There was a problem hiding this comment.
This hunk changes INNER_ITER from 110 to 20 in addition to adding TIME_DOMAIN/TIME_ITER. Since the PR description doesn’t mention adjusting INNER_ITER, please confirm the reduction is intentional (e.g., to reduce CI runtime) and document it to avoid silently changing the testcase’s numerical setup.
- Revert plunging LINEAR_SOLVER_PREC to LU_SGS (ILU caused divergence on CI) - RANS and Euler test_vals updated to CI Docker computed values - RANS CI values: [-2.474001, -6.039495, 0.031041, 0.053671] - Euler CI values: [-1.864773, 3.545935, 0.035685, 0.035843] - Plunging LU_SGS values: [-5.248321, 0.372499, 2.100860, 6.212394]



Proposed Changes
Three unsteady test case configs were missing TIME_DOMAIN=YES and TIME_ITER, causing SU2 to silently default to a single steady iteration instead of running an unsteady simulation. This PR fixes all three configs and registers them in serial_regression.py so they are CI-tested going forward.
Changes made:
pitching_naca64a010_rans/turb_NACA64A010.cfg — fix SOLVER=RANS (was NAVIER_STOKES despite KIND_TURB_MODEL=SA), add TIME_DOMAIN=YES, TIME_ITER=100, remove deprecated EXT_ITER, add SCREEN_OUTPUT
pitching_naca64a010_euler/pitching_NACA64A010.cfg — add TIME_DOMAIN=YES, TIME_ITER=100, remove deprecated EXT_ITER, add SCREEN_OUTPUT
plunging_naca0012/plunging_NACA0012.cfg — add TIME_DOMAIN=YES, TIME_ITER=100, remove deprecated EXT_ITER, add SCREEN_OUTPUT
serial_regression.py — register all three cases with test_iter=1 and unsteady=True, following the pattern of the existing unst_inc_turb_naca0015_sa entry
All three cases were run locally with SU2 v8.4.0 on Ubuntu 24 / GCC 13. Residuals converge steadily through inner iterations and CL/CD values change each time step confirming dual time-stepping is working correctly.
Related Work
Fixes #2524
PR Checklist