Skip to content

Refactor wake models and solvers - #1197

Merged
misi9170 merged 51 commits into
NatLabRockies:dev/v5-betafrom
misi9170:ehmt/solvers
Aug 3, 2026
Merged

Refactor wake models and solvers#1197
misi9170 merged 51 commits into
NatLabRockies:dev/v5-betafrom
misi9170:ehmt/solvers

Conversation

@misi9170

@misi9170 misi9170 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

This is a major PR that restructures how FLORIS implements wake models and solvers. In particular, it removes the capability of mixing and matching wake deficit, deflection, and turbulence models, instead unifying these into a single "model," and it combined the "solver" with the wake model itself.

This has the following benefits:

  • It makes the interface clearer for the vast majority of users, that were not "mixing" different types of model
  • It allows user-defined wake models to be passed in directly
  • Turbine quantities (e.g. powers) will be computed during the main turbine solve, and can then be accessed at the FlorisModel level, making the structure more flexible in being able to handle different ways in which the turbine quantities are evaluated.

However, the following support will be removed:

  • Mixing different parts of different wake models (e.g. Jensen deficit model with Gauss deflection model). These were never tested and likely did not fully work, so I consider this to be a reasonable loss.

In making this change, I have also been working with the Farm and Turbine classes some. At this stage, I'm not sure whether I'll keep those changes or revert them, or create a separate PR for them. Time will tell. EDIT: these were separated into #1200, which is now merged.

Still to do:

  • Access turbine functions from the operation_model directly Refactor the Turbine and Farm class #1200
  • Convert all inbuilt wake models to the new structure [remaining: CC, TurboparkGauss (remove TurboPark)]
  • Update FLORIS input files, and decide on back compatibility
  • Clean up WakeModelManager usage
  • Build converters from v4 input files to v5.
  • Decide whether to support various combination models [decided to continue to support various pre-packaged combination models, although I've refactored how this is done slightly]
  • Look for opportunities to cut down on repeated code [likely other opportunities, but the big one (matching deflection model in Gauss, CumulativeCurl wake models) is addressed]
  • Update documentation [I'm going to leave this out of this PR. It'll certainly be needed, but with other possible structural changes to come in v5, it'll be easier to document them all in one dedicated PR.]
  • Calculate turbine quantities (e.g. power) during solve and store on Farm [Leaving for a separate PR; edit: decided to go ahead with this after all, so it's now in]

Some items on this TODO list may be left for a future PR, depending on how I get on.

This PR supersedes #503.

misi9170 and others added 30 commits October 17, 2025 20:27
@misi9170 misi9170 added the v5 Development for a future FLORIS version 5 label Jul 23, 2026
@misi9170
misi9170 marked this pull request as ready for review July 24, 2026 02:44
@misi9170

misi9170 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

I've run some profiling similar to what I did here.

Here is the profiling on the base dev/v5-beta branch:

image

And again on the refactored ehmt/solvers branch:

image

The upshot is that there is not much of a performance change, and I was not expecting there to be. The refactored code seems to run slightly faster, but that could be just a fluke.

@misi9170

misi9170 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Assuming all checks and tests pass, I'm will merge this without review, since it is going into a secondary development branch. There may be some bugs; if that is the case, I will open bugfixes to dev/v5-beta as they come up.

@misi9170
misi9170 merged commit 1f417ea into NatLabRockies:dev/v5-beta Aug 3, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v5 Development for a future FLORIS version 5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant