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

SciPy Yaw optimization classes: improved efficiency, automated downstream turbine exclusion and turbine-dependent weighing terms #245

Merged
merged 28 commits into from
Sep 23, 2021

Commits on Jul 22, 2021

  1. Implement yaw optimization functionality to automatically exclude tur…

    …bines from the optimization if the lower bound is equal to the upper bound. Also, I took particular care for allowing a non-zero fixed value for special situations, such as having an upstream turbine fixed at a yaw offset or mimicking non-zero vane bias. This functionality significantly speeds up optimizations since one can eliminate turbines beforehand, reducing the dimensionality of the optimization problem.
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    2d1a873 View commit details
    Browse the repository at this point in the history
  2. Add turbine weighing option to yaw.py in the scipy optimization suite…

    …. Now one can use a full farm model to optimize only for a subset of turbines. Doing this, one includes the wake effects of other turbines without caring about them in terms of power capture.
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    5fb31cb View commit details
    Browse the repository at this point in the history
  3. Implement functionality in YawOptimizationWindRose to only optimize f…

    …or a select number of yaw angles through specifying the yaw angle bounds. For yaw angles of turbines that should be excluded as control variables, the lower bound should be specified as equal to the upper bound. This lb==ub does not necessarily have to be 0.0, but can also be a nonzero number, if one desires to keep that turbine fixed at that misalignment. Secondly, I implemented a turbine weighing function with which the floris-produced turbine power production values are multiplied in the calculation of the objective/cost function. This allows one to remove turbines from contributing to the cost function. This is particularly useful if one a subset of turbines takes part in a wake steering experiment, whereas the other turbines should be modeled for their wake effects.
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    35455a8 View commit details
    Browse the repository at this point in the history
  4. Add functionality to yaw.py to automatically estimate what turbines a…

    …re the most downstreamturbines (i.e., their wakes have no effect on other turbines/the power of the farm). Then, these turbines are excluded in the optimization if exclude_downstream_turbines=True. This allows the user to easily reduce the number of variables to optimize without any loss in performance, potentially leading to significant reductions in computation time.
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    41691b9 View commit details
    Browse the repository at this point in the history
  5. Implement similar functionality for exclusion of downstream turbines …

    …in yaw_wind_rose.py (see previous commit)
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    ae75697 View commit details
    Browse the repository at this point in the history
  6. Quick bug fix for new features in yaw.py and yaw_wind_rose.py. Array …

    …dimension did not match because the optimization variables were only reduced if bnds was not None. However, even with bnds=None, we can only be optimizing a subset of turbines due to exclude_downstream_turbines=True. Hence, always reduce variables. Worst case scenario, variables stay the same, negligible computational cost.
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    108e20f View commit details
    Browse the repository at this point in the history
  7. Implement new features in parallelized yaw optimization function too.…

    … Needs verification.
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    fc85499 View commit details
    Browse the repository at this point in the history
  8. Refactor some of the recent improvements into a separate function. Al…

    …so, this facilitates a bug fix where initially the downstream turbines were only calculated for the first wind direction in the array (for _wind_rose.py), while it should be calculated and the solution space is to be modified for every optimization call.
    Bart Doekemeijer committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    c0775ce View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. Bug fix for setting bounds closest to 0. when non-zero bounds are spe…

    …cified for a downstream machine
    Bart Doekemeijer committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    63183a4 View commit details
    Browse the repository at this point in the history
  2. Further fix bound fixing for downstream turbines. Also, add descripti…

    …on for exclude_downstream_turbines in yaw.py
    Bart Doekemeijer committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    7dbaa24 View commit details
    Browse the repository at this point in the history
  3. Add description for exclude_downstream_turbines docstring

    Bart Doekemeijer committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    6504d50 View commit details
    Browse the repository at this point in the history
  4. Bug fixes to address applying bounds to a downstream machine when exc…

    …lude_downstream_turbines=True. Also, ensure initial conditions and predicted farm outputs are weighted appropriately with self.turbine_weights.
    Bart Doekemeijer committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    55d39c4 View commit details
    Browse the repository at this point in the history
  5. Move _reduce_control_variables to private methods

    Bart Doekemeijer committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    64c00b6 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2021

  1. Add self.x_baseline as being the yaw angles that are inherently insid…

    …e floris when passed to the optimization class. This variable is used to calculate the baseline power production and can differ from the initial guess in the optimization, self.x0. Also, self.x0 is now no longer changed within the optimization class. Rather, the user is forced to specify an appropriate array for self.x0 that meets the bounds.
    Bart Doekemeijer committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    58ca7af View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2021

  1. Add more elaborate description in simple wake model and set a higher …

    …default wake slope to ensure validity for high turbulence cases
    Bart Doekemeijer committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    0bedbc3 View commit details
    Browse the repository at this point in the history
  2. Implement yaw_angles_baseline as separate variable

    Bart Doekemeijer committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    b65e0d2 View commit details
    Browse the repository at this point in the history
  3. Add INFO statement if not all baseline yaw angles are zero and also i…

    …mplement changes to yaw_wind_rose_parallel.py
    Bart Doekemeijer committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    b40097b View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2021

  1. Add a variable called self.yaw_angles_template where the yaw angles a…

    …re all np.nan, besides for downstream turbines which are assigned a value closest to 0.0 constraint-allowing, and for equality-constrained turbines which have their value equal to their lower bound (=upper bound). This clarifies which values are assigned to downstream and equality-assigned turbines
    Bart Doekemeijer committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    ffd61f8 View commit details
    Browse the repository at this point in the history
  2. Update yaw_angles_template to have a non-nan value for every turbine …

    …for situations such as where ws > ws_max or ws < ws_min. Namely, in that situation, we should just fall back to the baseline situation where we put every turbines yaw angle as close to 0.0 as possible.
    Bart Doekemeijer committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    6ecf10a View commit details
    Browse the repository at this point in the history
  3. Remove unused variables in _reduce_control_variables

    Bart Doekemeijer committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    401e53e View commit details
    Browse the repository at this point in the history
  4. Implement recent changes in yaw.py to yaw_wind_rose.py and yaw_wind_r…

    …ose_parallel.py. Specifically, we now create a yaw_angles_template variable that is the default yaw angle array, meeting the equality constraints and also setting the right values for downstream turbines. In optimization, values for the turbines still be to optimized will be overwritten, and the remaining values (for equality-constrained and downstream turbines, if applicable) are unchanged. These changes clarify the default values for turbines, different from x0 (initial guess) and different from yaw_angles_baseline (baseline values for initial power evaluation).
    Bart Doekemeijer committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    954b336 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2021

  1. changing imports to be relative

    bayc committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    6ed1d13 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cddfe91 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0e0bf58 View commit details
    Browse the repository at this point in the history
  4. updating formatting

    bayc committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    e76fc4b View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2021

  1. Update yaw.py docstring

    Bart Doekemeijer committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    c87dc35 View commit details
    Browse the repository at this point in the history
  2. Update yaw_wind_rose.py and _parallel.py docstring

    Bart Doekemeijer committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    8bfa4e9 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'revised-optimization' of github.com:Bartdoekemeijer/flo…

    …ris into HEAD
    Bart Doekemeijer committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    b83b67b View commit details
    Browse the repository at this point in the history