Skip to content

Sg/floris interface#17

Draft
skygering wants to merge 20 commits intomasterfrom
sg/floris_interface
Draft

Sg/floris interface#17
skygering wants to merge 20 commits intomasterfrom
sg/floris_interface

Conversation

@skygering
Copy link
Copy Markdown
Contributor

@skygering skygering commented Jan 8, 2026

You're making a pull request to a branch (probably main) of MITWindFarm. Please ensure you have done the following.

  • Request a review from other Howland Lab members who use MITWindFarm.
  • Add at least a sentence on your change to the documentation (probably the quickstart guide).
  • Add tests for your new functionality.
  • Make sure the tests pass and the documentation notebook still runs.
  • Get approval from the folks you requested a review from.

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:

  • power
  • thrust_coefficent
  • axial_induction

The new user-defined rotor operation models, MITRotorTurbine, takes in the following optional arguments:

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.
Screenshot 2026-01-07 at 7 44 18 PM

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).
Screenshot 2026-01-07 at 7 45 01 PM

I also plotted the interpolators for pitch and tsr that I created just to make sure that was looking alright. Compare to figure 2:
Screenshot 2026-01-07 at 7 49 53 PM

@skygering skygering requested review from jaimeliew1 and removed request for jaimeliew1 January 8, 2026 00:23
@skygering skygering marked this pull request as draft January 8, 2026 00:23
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?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should fill_value be extrapolate?

# calculate rotor area
rotor_area = np.pi * self.bem_model.rotor.R**2

# loop over flow conditions -> TODO: should this be vectorized?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should this be vectorized?

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)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do we need to limit or control the number of fixed point iterations?

@skygering
Copy link
Copy Markdown
Contributor Author

I improved my validation figures! The "Floris" lines are FLORIS used with the MITRotor interface.

example_5_pitch_tsr_interpolation example_5_IEA15mw_CT_CP

@skygering
Copy link
Copy Markdown
Contributor Author

example_5_IEA15mw_CT_CP

@misi9170
Copy link
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants