Skip to content

Match maxHF history header in SU2_PY history map - #2906

Closed
ManasBagul23 wants to merge 2 commits into
su2code:developfrom
ManasBagul23:fix-maxhf-history-header
Closed

ManasBagul23 wants to merge 2 commits into
su2code:developfrom
ManasBagul23:fix-maxhf-history-header

Conversation

@ManasBagul23

@ManasBagul23 ManasBagul23 commented Sep 16, 2026

Copy link
Copy Markdown

Proposed Changes

SU2_CFD writes the MAXIMUM_HEATFLUX history field with the header maxHF (and d[maxHF] for its derivative) since cc9e452, but SU2_PY/SU2/io/historyMap.py still expects MaxHF. The time-averaged fields derived from it are written as tavg[maxHF] and dtavg[maxHF], which the map also listed with MaxHF. read_history matches headers exactly, so MAXIMUM_HEATFLUX is never found and cannot be used as an objective or constraint from the Python scripts.

Checked with a laminar flat plate run (history output HEAT): on develop SU2.io.read_history returns TOTAL_HEATFLUX but not MAXIMUM_HEATFLUX; with this change both are found, and TAVG_MAXIMUM_HEATFLUX and TAVG_D_MAXIMUM_HEATFLUX are mapped for tavg[maxHF] and dtavg[maxHF] headers.

Related Work

Closes #2916.

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • 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.

SU2_CFD writes the MAXIMUM_HEATFLUX history field with the header
"maxHF" (and "d[maxHF]" for its derivative), but historyMap.py expects
"MaxHF". read_history matches headers exactly, so MAXIMUM_HEATFLUX was
never found in the history file and could not be used as an objective
or constraint from the Python scripts.
Copilot AI lite review requested due to automatic review settings September 16, 2026 19:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Update the remaining time-averaged maximum-heat-flux mappings.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates Python history mappings to match SU2_CFD’s lowercase maxHF header naming.

Changes:

  • Corrects direct maximum heat-flux and derivative mappings.
  • Time-averaged mappings still require matching updates.
File summaries
File Summary
SU2_PY/SU2/io/historyMap.py Direct mappings are corrected, but time-averaged entries still use MaxHF instead of maxHF (moderate, 3 votes).
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

"in MARKER_MONITORING",
"GROUP": "HEAT",
"HEADER": "MaxHF",
"HEADER": "maxHF",
The time-averaged fields derive their headers from the base field name,
so SU2_CFD writes tavg[maxHF] and dtavg[maxHF], not tavg[MaxHF] and
dtavg[MaxHF].
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.

3 participants