Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLORIS Tools API improvements #512

Merged
merged 8 commits into from
Nov 14, 2022
Merged

FLORIS Tools API improvements #512

merged 8 commits into from
Nov 14, 2022

Conversation

rafmudaf
Copy link
Collaborator

@rafmudaf rafmudaf commented Oct 18, 2022

Feature or improvement description
This pull request adds some consistency to a few areas of the floris.tools package. Some changes are minor bug fixes, but most are simply, in my opinion, improvements to the API's.

There is one major bug fix: floris_interface.calculate_wake was incorrectly handling non-zero yaw angles. In subsequent function calls, all-zero yaw angles were ignored, so if prior function calls had non-zero yaw settings those would be retained.

Related issue, if one exists
Fixes #443
Fixes #451

Impacted areas of the software
Tools

Test results, if applicable
I've also added a test to check the yaw angle setting / resetting in floris_interface.

@rafmudaf rafmudaf added enhancement An improvement of an existing feature v3 Label to denote focus on v3 floris.tools labels Oct 18, 2022
@rafmudaf rafmudaf added this to the v3.3 milestone Oct 18, 2022
@rafmudaf rafmudaf self-assigned this Oct 18, 2022
@paulf81
Copy link
Collaborator

paulf81 commented Oct 18, 2022

hi @rafmudaf this looks good! One thing I thought is could we merge this with pull request #496 because I think they target improvements to the same function in some places, maybe I could propose to target that pull request here or something?

This means users don’t have to also import matplotlib.pyplot as plt only to run plt.show()
Also replaces another method CutPlane.subtract to do something similar. That one made assumptions about the order and expected operations. The new subtract method expects all preprocessing to be down outside of the class.
In subsequent function calls, the yaw angles are not reset when they are all zeros. This means that if initially the yaw angles are non-zero and then they’re all-zero, the non-zero yaw settings are retained.
Copy link
Collaborator

@paulf81 paulf81 left a comment

Choose a reason for hiding this comment

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

This looks great! Changes all make sense to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature floris.tools v3 Label to denote focus on v3
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants