Repository navigation
Feat/history overwrite option - #3042
Closed
nandininmmahesh-dotcom wants to merge 2 commits into
Closed
nandininmmahesh-dotcom wants to merge 2 commits into
nandininmmahesh-dotcom wants to merge 2 commits into
Conversation
## Proposed Changes Fixes for `MUSCL_TURB`, `MUSCL_SPECIES` and the bounded scalar scheme. One commit per fix; the test cases follow in the comments. - **Limiter lost after `LIMITER_ITER`:** the turbulence and species were then reconstructed with no limiter at all. Now the last limiter values are kept, as in the flow. - **`VAN_ALBADA_EDGE` stopped the run** for turbulence and species. It now works, as in the flow. - **The flow's `VAN_ALBADA_EDGE` was ignored** for the velocity that carries the turbulence. Now it is applied. - **Reconstruction gradient computed without MUSCL:** with `MUSCL_TURB= NO` (or `MUSCL_SPECIES= NO`), the turbulence and species still computed a separate reconstruction gradient when the flow used one. Now only when they reconstruct. - **Bounded scheme with density different from 1:** its correction did not match the flux it corrects, and at sliding interfaces it was added once per interpolation donor. Both now match the flux. - **Values outside the allowed range:** the reconstruction could make k or omega negative at a face, which can stop convergence. Such a face now falls back to first order, as the flow does for negative pressure. New test `turb_naca0012_sst_muscl_edge`. Reference values of `rae2822_sa`, `rae2822_sst`, the venturi and flamelet species tests and `bars_SST_2D` will be updated from the CI. ## Related Work - su2code#2910 (closed): same aim as the first fix. ## PR Checklist - [x] I am submitting my contribution to the develop branch. - [x] My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson). - [x] My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/). - [x] I used the pre-commit hook to prevent dirty commits and used `pre-commit run --all` to format old commits. - [x] I have added a test case that demonstrates my contribution, if necessary. - [x] I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: rois1995 <rauxa1995@gmail.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: bigfooted <bigfootedrockmidget@hotmail.com>
…pend control The history file was always overwritten on each SU2 run, with no option to preserve convergence history across multiple executions. This adds a new config option WRT_HISTORY_OVERWRITE that mirrors the existing pattern used for restart, surface, and volume output files. Changes: - Common/src/CConfig.cpp: Add WRT_HISTORY_OVERWRITE bool option (default YES) - Common/include/CConfig.hpp: Add member + getter GetWrt_History_Overwrite() - SU2_CFD/src/output/COutput.cpp: Use ios::app mode when option is NO - config_template.cfg: Document the new option Behavior: WRT_HISTORY_OVERWRITE= YES (default) — truncate history file each run WRT_HISTORY_OVERWRITE= NO — append to existing history file Testing verified: - Meson build completes successfully - Option recognized in config parsing - Default overwrite mode: file truncated on each run - Append mode: data from multiple runs preserved in single file - Dry-run and full solver execution both work correctly Closes su2code#3037
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
Add a WRT_HISTORY_OVERWRITE option so the history file isn't always overwritten. Same pattern as the existing WRT_RESTART_OVERWRITE, WRT_SURFACE_OVERWRITE, and WRT_VOLUME_OVERWRITE flags. Default is YES (truncate), set to NO to append instead — useful when you want to keep convergence history from multiple runs in one file.
Related Work
Fixes #3037.
PR Checklist