SU2 icon indicating copy to clipboard operation
SU2 copied to clipboard

Python optimization with a BUFFET objective or constraint fails with BUFFET_MONITORING: invalid option name

Open ManasBagul23 opened this issue 2 months ago • 0 comments

Describe the bug

BUFFET_MONITORING was removed from CConfig, the buffet sensor is now always evaluated for viscous problems. read_config in SU2_PY/SU2/io/config.py still sets BUFFET_MONITORING= YES when BUFFET is an objective or a constraint, and dump_config writes every key, so SU2_CFD rejects the configuration written by the Python scripts.

To Reproduce

Add OPT_OBJECTIVE= BUFFET * 1.0 to a Navier-Stokes configuration (for example TestCases/navierstokes/naca0012/lam_NACA0012.cfg), then

import SU2
config = SU2.io.Config("base.cfg")
config.dump("dumped.cfg")

and run SU2_CFD -d dumped.cfg:

Line 61 BUFFET_MONITORING: invalid option name. Check current SU2 options in config_template.cfg.

Expected behavior

The configuration written by the Python scripts can be read by SU2_CFD.

A fix is proposed in #2905.

Bug report checklist

  • [x] Consulting the build instructions (https://su2code.github.io/docs_v7/Build-SU2-Linux-MacOS/).
  • [x] Looking for similar problems on GitHub or CFD-Online (https://www.cfd-online.com/Forums/su2/).
  • [x] Updating to the newest version of SU2 (either develop, master, or the pre-built executables https://su2code.github.io/download.html).

Desktop (please complete the following information):

  • OS: Windows 11
  • C++ compiler and version: MSVC 19.44 (Visual Studio 2022 Build Tools)
  • MPI implementation and version: Microsoft MPI 10.1
  • SU2 Version: develop

ManasBagul23 avatar Sep 17 '26 16:09 ManasBagul23