Fix OptimalPropeller.py for a hub smaller than the first station - #2920
Closed
ManasBagul23 wants to merge 1 commit into
Closed
ManasBagul23 wants to merge 1 commit into
ManasBagul23 wants to merge 1 commit into
Conversation
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.
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
i_hubinSU2_PY/OptimalPropeller.pywas only assigned when a radial station lies inside the hub, so a hub radius smaller thanR/stations(e.g. no hub) stopped the script withNameError. 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 = 0the script now runs (dCT integral 0.1000, dCP integral 0.0618), and withr_hub = 0.1the generatedActuatorDisk.datandActuatorDisk.cfgare identical to develop.Related Work
Closes #2918.
PR Checklist
pre-commit run --allto format old commits.