-
Notifications
You must be signed in to change notification settings - Fork 181
Curled wake model wind farm solver implementation #1134
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
base: develop
Are you sure you want to change the base?
Conversation
…lant with random layout.
|
@misi9170 , thanks for meeting with me earlier today and talking through the changes. |
|
@tonyinme , I know you're still working here---I've just updated some formatting and requirements so that the tests run through. If you want to be able to address the formatting yourself, you can pip install floris with the develop option and then run to run the tests and to check formatting. That will catch most formatting issues (although it only runs in the current python version, which isn't completely bulletproof because the tests/checks run in various python versions 3.9--3.13, which is why I had to make a couple of pushes here to get the numba install right...). |
|
Looks like numba version 0.61.2 is installed for all python versions 3.10 and up; but 0.60.0 is installed for python 3.9. We are planning to remove support for python 3.9 in the coming months as it reaches end-of-life. We can update the pyproject toml with an exact specification for numba later, once we get closer to final implementation and review. |
|
Perfect, thanks @misi9170 ! I've made some improvements today to the turbulence model. |
|
@misi9170 , thanks for the help with this implementation. |
|
Hi @tonyinme , I've now gone in and reworked the code to allow it to operate over multiple wind conditions (findices) at once. That's working fine, although I wasn't able to get away from at least some sort of loop, so there is a loop that runs n_findex x n_turbines times (but at least it doesn't run n_findex x n_planes times :) ). I also refactored the code in curled_wake.py to use vectorized operations and remove the numba decorators and import. I still need to investigate whether this is slower than using numba though. I'll now need to go through everything slowly and clean things up. As I'm going that, I'll make a list of items that we still need to address. But, in the meantime, you can check out the operation over multiple conditions in examples/examples_curled_wake/01_test_cwm_solve.py |
|
Hi @misi9170 , excellent! Thanks for working your magic and updating the code to use the proper indexing. I tested the code and it is similar than before so all is good from my end. Thanks! |
This is a draft PR to get the conversation started on the implementation of the curled wake model in floris.
@misi9170 and @bayc have been helping with the implementation.
The backbone code structure was suggested by @misi9170
Here are some of the things that need to be addressed.