Skip to content
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

Wind direction heterogeneity #954

Draft
wants to merge 39 commits into
base: develop
Choose a base branch
from
Draft

Conversation

misi9170
Copy link
Collaborator

@misi9170 misi9170 commented Aug 1, 2024

THIS PULL REQUEST IS A WORK IN PROGRESS

(re)Introducing wind direction heterogeneity in FLORIS

In FLORIS v2, there was handling for wind direction heterogeneity. Wind direction heterogeneity was not straightforward to continue supporting in the vectorization effort for v3, and was dropped. This pull request reintroduces a new method for handling wind direction heterogeneity by "warping" the turbine layout mimic the effects of a wind direction change.

This is currently a work in progress, and is missing several crucial steps. I will update this description as those steps are addressed.

Critical pieces still needed:

  • Handling different wind directions (currently, works only for 270 degree winds)
  • Setting main wind speed and wind direction according to specified u, v values (i.e., reconciling the turbine ordering based on the wind_direction with that based on u and v) (u and v are now taken as relative to main wind direction)
  • Setting wind speed heterogeneity using u, v values
  • Setting main wind speed using u, v values?

Other TODO items:

  • Expand to 3D case (u, v as a function of z; possibly allow w specification)
  • Handle case where z is provided for speed multipliers (by averaging over z)
  • Add supporting code to all solvers (currently works with sequential_solver and full_flow_sequential_solver)
  • Add supporting code to all (necessary) grid types
  • Add supporting code to HeterogeneousMap
  • Check that solve speed is not significantly affected

Housekeeping

  • Existing tests pass
  • New functionality tests
  • Clean up examples
  • Formatting (ruff, isort, etc)
  • Docstrings
  • Documentation

Methodology

The core idea here for modeling wind direction heterogeneity is that, rather than move the wakes to new locations based on local wind directions, it is easier to move the turbine locations a commensurate amount (warping the turbine layout). After testing several prototypes, the current methodology essentially works by assigning an equivalent wind farm layout for each turbine, based on the wind direction changes occurring in the wake of that turbine. That is, when solving for the wakes, the wind farm has a different layout depending on which turbine in the farm is being evaluated.

Users specify these wind direction changes by specifying the "u" (x-directional, i.e. west to east) and "v" (y-directional, i.e. south to north) components of the wind (that is, by specifying a 2D discrete velocity field). Streamlines are propagated from the rotor centers, which define the path of the wake center; these streamlines are then used to determine movement distances for the turbines. That is, the layout is warped according to the streamline to achieve the equivalent effect of a curved wake.
EDIT: after playing around with this some more, I think we will let "u" be the "along-stream" component, where the direction of the stream is specified by wind_direction, and "v" be the "cross-stream" component. That is, u and v are relative to the oncoming wind direction.

We intend to submit a paper describing the warped layout methodology, as well as comparisons to operational data, in the coming months.

Examples

Examples, which are a work in progress, can be found in examples/examples_heterogeneity/. The new examples begin with 00x_, for the time being until I have cleaned them up and renamed them.

Running 00x_wind_direction_heterogeneity.py produces

Difference (MW): [[0.         0.         0.27390606 0.61041914]]

(that is, the downstream turbines' powers are higher in this specific heterogeneous wind condition than in the aligned case)
and
wd_het_1

Running 00x_wind_direction_heterogeneity_visualization.py with viz_by_sweep = False produces
wd_het_2
and with viz_by_sweep = True produces
wd_het_3

Note that even once (if) this pull request is completed and merged, wind direction heterogeneity capabilities will likely be a beta feature for some time as we iron out any wrinkles that may arise.

Affected area of the code

The main areas affected by the code are:

  • floris/core/grid.py (as layout grids are modified to equivalently reflect wind direction heterogeneity)
  • floris/utilities.py (where the main code that computes the streamlines and then warps the layouts appropriately is stored)
    There are also other small changes to:
  • floris/core/core.py
  • floris/floris_model.py

Acknowledgements

Thanks to Paul, Yorgos, Diederik, Raf, Sam, and others for letting me bounce ideas around.

… so that Grid() can have heterogeneous_inflow_config take a default of None.
@misi9170 misi9170 marked this pull request as draft August 1, 2024 21:26
@misi9170 misi9170 added the new-feature A new feature label Aug 1, 2024
@misi9170
Copy link
Collaborator Author

misi9170 commented Aug 1, 2024

Note that, finally, the streamlines are used to determine a turbine movement, not to actually calculate the wake profile along the streamline. For this reason, I do not think that this fully addresses the suggestion (for wind speed heterogeneity) by @CaiZhiming-HHU in #851. However, it should expand our ability to model complex terrain by proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant