Skip to content

Fix OptimalPropeller.py for a hub smaller than the first station - #2920

Closed
ManasBagul23 wants to merge 1 commit into
su2code:developfrom
ManasBagul23:fix-optimal-propeller-no-hub
Closed

ManasBagul23 wants to merge 1 commit into
su2code:developfrom
ManasBagul23:fix-optimal-propeller-no-hub

Conversation

@ManasBagul23

Copy link
Copy Markdown

Proposed Changes

i_hub in SU2_PY/OptimalPropeller.py was only assigned when a radial station lies inside the hub, so a hub radius smaller than R/stations (e.g. no hub) stopped the script with NameError. It now starts at the first station.

Checked with 50 stations, CT 0.1, R 1.0, J 0.5, Vinf 10: with r_hub = 0 the script now runs (dCT integral 0.1000, dCP integral 0.0618), and with r_hub = 0.1 the generated ActuatorDisk.dat and ActuatorDisk.cfg are identical to develop.

Related Work

Closes #2918.

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.

i_hub was only assigned when a radial station lies inside the hub, so a
hub radius below R/stations (e.g. no hub) stopped the script with
NameError. Start from the first station in that case.
Copilot AI lite review requested due to automatic review settings September 18, 2026 16:58

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bigfooted bigfooted closed this Sep 18, 2026
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