Add interface to enable CurledWindfarm to be called via FLORIS - #36
Merged
Conversation
…y vertical profile)
skygering
reviewed
Jul 30, 2026
skygering
reviewed
Jul 30, 2026
skygering
reviewed
Jul 30, 2026
skygering
reviewed
Jul 30, 2026
Contributor
Author
|
@skygering , I think you mentioned this, but for documentation would you like me to just add a few blocks to examples/MITWindfarm_quickstart.ipynb? EDIT: I've gone ahead and put a short description and demonstration to examples/MITWindfarm_quickstart.ipynb, but I can move it or add to it if you'd like |
skygering
reviewed
Aug 12, 2026
Co-authored-by: Skylar A Gering <sgering@g.hmc.edu>
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
Co-authored-by: Skylar A Gering <sgering@g.hmc.edu>
Co-authored-by: Skylar A Gering <sgering@g.hmc.edu>
skygering
reviewed
Aug 12, 2026
Co-authored-by: Skylar A Gering <sgering@g.hmc.edu>
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
skygering
reviewed
Aug 12, 2026
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.
Description
This PR introduces a new class,
FlorisCurledWindfarm, which wraps theCurledWindfarmmodel so that it can be passed to theset_wake_model()method on theFlorisModelclass in FLORIS. This then enabled to use theCurledWindfarmmodel in their FLORIS workflows.Note that the
set_wake_model()method is currently only available on this branch of FLORIS, but will soon be merged into the FLORIS v5 development branch.To run, for now, you'll need to switch to the ehmt/solvers branch on my fork of FLORIS.
Main code
The source code is contained in a new file, mitwindfarm/FlorisInterface.py. The main code is in the
FlorisCurledWindfarmclass, as described above. However, to enable interaction with FLORIS-style turbine operation models, I've added a second class,RotorWrapper(I'm very happy to change the name for either of these classes). This essentially wraps Floris-style turbine operation models so that they appear as expected by MITWindfarm (note thatRotorWrapperinherits from the existingRotorclass in MITWindfarm).Other changes
In creating this PR, I've made a couple of other minor changes to the code. Some of these are not strictly needed and could be reverted, as noted.
np.trapz->np.trapezoid), examples/example_10_BEM_yaw_tilt.py, pyproject.toml. In talking to @skygering , it sounds like thetrapz/trapezoiddistinction has been important in the past, but that it's ok to convert to thetrapezoidfunction from numpy v2 now.betatobeta_sinUnifiedMomentumTIandUnifiedMomentumTI_x0classes, which follows this PR in the Unified-Momentum-Model repo (UnifiedMomentumTIandUnifiedMomentumTI_x0inherit fromUnifiedMomentumin Unified-Momentum-Model)plot_windfarm(). I originally did this so that I could run theCurledWindfarmwith absolute wind speeds (e.g., 8 m/s), but that is not strictly needed and in fact has now been removed from my examples and code. The default values forvminandvmaxpreserve the existing behavior. Can be reverted.To do items
I still have a few TODO items left to address before this is ready for full review/merger:
x0, to the wake solverI also need to:
MITWindfarm-provided checklist: