Conversation
skygering
commented
Jan 8, 2026
| x = x[idx] | ||
| y = y[idx] | ||
| # return interpolator for y | ||
| return interp1d(x, y, kind="linear", fill_value="extrapolate", bounds_error=False) # TODO: should fill_value be extrapolate? |
Contributor
Author
There was a problem hiding this comment.
Should fill_value be extrapolate?
skygering
commented
Jan 8, 2026
| # calculate rotor area | ||
| rotor_area = np.pi * self.bem_model.rotor.R**2 | ||
|
|
||
| # loop over flow conditions -> TODO: should this be vectorized? |
Contributor
Author
There was a problem hiding this comment.
Should this be vectorized?
skygering
commented
Jan 16, 2026
| pitch = np.deg2rad(self._pitch_interp(vel)) | ||
| tsr = self._tsr_interp(vel) | ||
| # solve BEM | ||
| bem_sol = self.bem_model(pitch, tsr, yaw = yaw, tilt = tilt) |
Contributor
Author
There was a problem hiding this comment.
Do we need to limit or control the number of fixed point iterations?
Contributor
Author
Contributor
Author
|
Just a heads up that I made a few updates to the FLORIS branch that this works off, but I've rerun both your example and some integration tests on my side and everything is still working as it should be. Regarding the failing tests: FLORIS no longer supports python version 3.9 as of FLORIS v4.6, as python 3.9 is now at end of life. |
* Attempt at vecotization in pre-process * Working through initial 2 turbine test * Working with 10x speedup for rotor, 2x slowdown for annulus * Vectorization working with Np as the first axis * Fixed some tests with float input, but needs more work * Updated example 6 to include LUT example * Time vectorized code * Fix example timing script * All tests pass, other than new dimensional tests * Vectorization complete * Clean up BEM tests
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.



You're making a pull request to a branch (probably main) of MITWindFarm. Please ensure you have done the following.
This is not ready to merge!! This is a draft of an interface for using MITRotor within FLORIS.
I have written the interface to include the following three function:
powerthrust_coefficentaxial_inductionThe new user-defined rotor operation models,
MITRotorTurbine, takes in the following optional arguments:bem_model (BEM): optional BEM model as defined in MITRotor, defaults to IEA15MW with UMM momentum modelpitch_csv (str): optional path to pitch trajectory based on wind speed, defaults to IEA15MW Figure 2 (https://docs.nrel.gov/docs/fy22osti/82134.pdf)tsr_csv (str): optional path to tsr trajectory based on wind speed, defaults to IEA15MW Figure 2 (https://docs.nrel.gov/docs/fy22osti/82134.pdf)This follows the outline laid out in this branch of FLORIS and in this example within the branch.
The default rotor is the IEA 15 MW. The control right now is just a trajectory (based on wind speed) that is interpolated based on Figure 2 here. If a user wants to use a different turbine, they also need to provide two trajectory CSV files.
I have written a small test suite to confirm that the thrust coefficient and axial induction produced by FLORIS with MITRotor is nearly the same as just MITRotor by itself. I also checked that the leading turbine's power decreases with yaw (and second turbine's power increases if first turbine is yawed).
I also tried to compare with a plot from the IEA 15MW technical report. The below is figure 3-2 on page 20.

It seems like we are in the right ballpark, although the ranges of pitch and tsr don't really fully overlap for wind speeds run (between 5m/s and 25m/s).

I also plotted the interpolators for pitch and tsr that I created just to make sure that was looking alright. Compare to figure 2:
