Interactive Python CLI Wizard for Generating SU2 .cfg Files #2771
Replies: 3 comments
-
|
Hi, this would be good to build into SU2, if we can represent the logic of what options are active directly in C++, or in python and generate the C++ from python, maintaining the logic in two languages would be a no go for me. |
Beta Was this translation helpful? Give feedback.
-
|
Hey pedro, I think I can see your point. I'll look into it and study both options to see what the most practical approach would be for this. |
Beta Was this translation helpful? Give feedback.
-
|
The most difficult thing I think is to represent the dependencies properly and do validation checking. We implemented a basic validator in the GUI. However, a generalization that can be used by the SU2_CFD solver as well as the GUI would be preferred. I looked at jsonvalidator, but I am not sure if it is truly up for the task. If the options and dependencies can be somehow stored in a human-readable file and read by a validator routine, that would be a good option. I can check out the GUI code to see what was done there. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
While going through the SU2 codebase for my GSoC proposal, I put together a Python CLI tool to make generating
.cfgfiles a bit easier and less error-prone: SU2-wizard.Instead of hardcoding the settings, the script parses
config_template.cfgandoption_structure.hppto build a database of the options (currently handling all 689 for v8.4.0).A few things it currently does:
ezgif-2ea1ad2c795a65c0_1.mp4
I wanted to share this here to see if others find it useful.
Also, a question for the maintainers: is this something that would be useful to integrate and ship directly with SU2, perhaps in the Python utilities directory? If there's interest, I'd be happy to open a PR and work on adding the conflict detection rules from
SetPostprocessing().Beta Was this translation helpful? Give feedback.
All reactions