Fix #2483: Implement field-based restart loading for turbulence solvers #2706
+246
−32
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
This PR fixes the crash that occurs when restarting simulations with missing fields in restart files. I've implemented field-based restart loading for turbulence and transition solvers, so you can now restart a RANS simulation from an Euler solution, or switch between turbulence models (e.g., SA to SST) without SU2 crashing.
The implementation uses field name lookup instead of fixed offsets, making restart files more flexible. When a field is missing (like
Nu_Tildewhen restarting SA from Euler), SU2 now initializes it from defaults and shows a clear warning instead of crashing.std::findCTurbSolver::LoadRestart()to support SA and SST models with missing fieldsCTransLMSolver::LoadRestart()for LM transition model compatibilityRelated Work
Resolves #2483
This addresses the long-standing issue where SU2 would crash when enabling turbulence models or switching between models during restart. The implementation is backward compatible - existing restart workflows continue to work unchanged.
PR Checklist
pre-commit run --allto format old commits.