-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add support to shut off turbines #693
Conversation
Added a turbines_off argument to the Ct and axial_induction functions.
Hi @ElieKadoche thank you for submitting this pull request! I also very much appreciate you adding documentation via an example to demonstrate this code - well done. Conceptually, this design is a bit intrusive to the low level code as the
FWIW the yaw settings should follow a similar design as described above. I let the scope creep already on these Turbine functions, and I'll make note to improve this design in future work. |
Just wanted to highlight that this would be a very useful functionality to have! Thanks @ElieKadoche for taking the initiative!! |
Thank you for your feedbacks, I understand that the proposed design is a bit intrusive. Considering yaw angles and turbines off outside of the core code would require important refactoring? |
Thanks for the added context @ElieKadoche. My initial thought was to modify the turbine Ct curves from for turb_type in turb_types:
# Using a masked array, apply the thrust coefficient for all turbines of the current
# type to the main thrust coefficient array
thrust_coefficient += (
fCt[turb_type](average_velocities) <-- Here's the problem
* np.array(turbine_type_map == turb_type)
) This means that changing a turbine's thrust curve would change all the thrust for that type of turbine. To continue along this path means to make an entirely new turbine type that would be in the "off" configuration, and I don't think that's a reasonable workaround. If you want to see the changes I've made to get to here, its on a branch on my fork. In any case, I agree that this is a great idea, and I'd like to think through the architecture of this a bit more over the next few days. Thanks for your patience while we find the right way to integrate it into the full system. |
Thank you @rafmudaf for your branch, I can see where you want to go with the As proposed by @Bartdoekemeijer , modifying the In any case, as you said, there are a lot of refactoring to do in order to reach an acceptable architecture. |
@ElieKadoche @Bartdoekemeijer @misi9170 @rafmudaf , we've created a new pull request where we've adapted the proposed changes of this pull request into the new v4 framework where we believe this fits really nicely. I adapted the provided example and interface changes and it should function the same way. Hope that this works for you! |
Going to close this now following the merge of #799 |
Added the possibility to shut off some turbines (related issue #687).
The new
turbines_off
argument is similar to theyaw_angles
argument.The feature does not alter FLORIS computations and can be used in a vectorized way for different wind directions and speeds.
Added a
turbines_off
argument to the following functions:Ct()
;axial_induction()
;calculate_wake()
;calculate_no_wake()
.The thrust coefficient is equal to 0.001 for turbines off.
In the
get_turbine_powers()
function, the power outputs of turbines off are set to 0.0 MW.I modified all the
Ct()
andaxial_induction()
functions in the./floris/simulation/solver.py
file accordingly.I modified the visualization functions to integrate the
turbines_off
argument.I integrated the feature in the
02_visualizations.py
example.I created a new example demonstrating the
turbines_off
feature.Files modified:
floris/simulation/farm.py
;floris/simulation/floris.py
;floris/simulation/solver.py
;floris/simulation/turbine.py
;floris/tools/floris_interface.py
;floris/tools/visualization.py
;floris/turbine_library/turbine_previewer.py
.