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

v3.1 #405

Merged
merged 33 commits into from
Apr 6, 2022
Merged

v3.1 #405

merged 33 commits into from
Apr 6, 2022

Conversation

rafmudaf
Copy link
Collaborator

@rafmudaf rafmudaf commented Mar 31, 2022

Feature or improvement description
Merge develop to main for v3.1 release.

Additional supporting information
Proposed release notes are given below.

Release TODO

  • Update the version in
    • README.rst
    • docs/index.rst
    • floris/VERSION
  • Verify readthedocs builds correctly GH Pages is actually using the develop branch
  • Create a tag in the NREL/FLORIS repository

Release Notes

#358 Feature: add IEA 15MW turbine
#373 / #407 Add no_wake option to floris calculations
#384 Add normal vector to CutPlane to invert plot axis
#369 Redesign AEP calculation function
#385 Bug fix for yaw optimizer: revise verify_convergence to support multiple wind speeds
#382 Add cut out and default reference option
#388 Save yaw angles for reset in plane visualizations
#386 Documentation improvements
#393 Remove energy ratio tools in favor of FLASC
#308 Add UncertaintyInterface for modeling inflow wind direction uncertainty
#381 Fix for repeated calls to calculate_wake returning incorrect values
#387 Bug fix and formatting for legacy reader for FLORIS V2.4 input files
#395 / #406 Add 'none' submodel option for wake deflection, deficit and turbulence
#404 Add command line interface to the legacy input converter
#396 Adding the TurbOPark wake velocity deficit model
#408 Add GH Actions to run examples
#410 Create all Grid data at initialization

paulf81 and others added 24 commits March 2, 2022 13:09
* Add no_wake option to calculate_wake()

* Move no_wake up to floris_interface.py and separate initialize_domain() function in floris

* updating tests to initialize domain

* updating quality metrics to initialize domain

Co-authored-by: bayc <christopher.j.bay@gmail.com>
* sketch in new AEP

* sketch in new aep function

* include a temporary no wake option

* update AEP function to use no_wake

* Update AEP example to use new function

* Implement cut_in_wind_speed and cut_out_wind_speed functionalities. Also format freq vector in get_farm_AEP in FLORIS dimensions.

* Quick bug fix and remove legacy _calc_one_AEP_case function

* Update the example 07 for AEP calculations in new style

* Significant simplications in get_farm_AEP function

* Remove legacy functions for AEP calculation

Co-authored-by: Bart Doekemeijer <bart.doekemeijer@nrel.gov>
)

* Revise the verify_convergence functionality in the yaw optimization base class to support multiple wind speeds
* update cut-in and cutout region for each turbine yaml

* add a check on reference height versus hub height and issue warning

* allow -1 for reference height to mean use hub-height

* Remove extrapolation, force definition in curve


Co-authored-by: bayc <christopher.j.bay@gmail.com>
* Save yaw angles for reset in plane visualizations

* Reset yaw angles through calculate_wake
* Include notebook as md

* Update README and docs to reflect v3 release

* Clarify points in the intro guide

* Clarify legacy vs new docs

* Add git / GitHub interaction guidelines
* Delete energy ratio tools

* Remove references to energy ratio tools

Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>
…ty (#308)

* Implement uncertainty modeling in FLORIS v3.0 in vectorized format. Uncertainty is now included as a wrapper around the regular `FlorisInterface` object.
* Add example demonstrating how to include uncertainty in wind farm simulations
* Implement copy feature in `FlorisInterface`
* Generalize yaw optimization compatibility with both `FlorisInterface` and `UncertaintyInterface`. Also fix bug in yaw optimizer when min/max yaw angle is an int.
* Add option in `UncertaintyInterface` to fix the yaw angles in the inertial or relative frame
* Remove `yaw_std` and update documentation

Co-authored-by: paulf81 <paul.fleming@nrel.gov>
…381)

* adding _sorted versions of variables (grid, farm, and flow field)

* updating tests to use _sorted variables

Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>
…387)

* Move legacy input reader to separate tool and apply bug fix to work with recent changes in turbine_types

* Add an example to demonstrate legacy input reader

* Remove examples for legacy input reader. Add a __main__ script to the legacy reader file as an example to demonstrate file v2->v3 conversion.
#395)

* Add 'none' submodel for deflection, deficit and turbulence

* Add INFO and WARNINGs for 'none' option

* Change warning message to error message if nonzero yaw angles are provided while deflection model is 'none'

* Delete example yaml file and example script
* Move legacy input reader to separate tool and apply bug fix to work with recent changes in turbine_types

* Add an example to demonstrate legacy input reader

* Remove examples for legacy input reader. Add a __main__ script to the legacy reader file as an example to demonstrate file v2->v3 conversion.

* Improve the CLI for input converter

Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>
* adding turbopark model, solver, and input file

Co-authored-by: Paul <paul.fleming@nrel.gov>
Co-authored-by: Rafael M Mudafort <rafael.mudafort@nrel.gov>
@rafmudaf rafmudaf self-assigned this Mar 31, 2022
@rafmudaf rafmudaf added the v3 Label to denote focus on v3 label Mar 31, 2022
@rafmudaf rafmudaf added this to the v3.1.0 milestone Mar 31, 2022
@github-pages github-pages bot temporarily deployed to github-pages April 1, 2022 17:04 Inactive
@bayc
Copy link
Collaborator

bayc commented Apr 1, 2022

@rafmudaf We should probably add tests for the none configurations, yea? The missing _sorted versions may have been caught with a test.

@github-pages github-pages bot temporarily deployed to github-pages April 1, 2022 19:16 Inactive
@bayc
Copy link
Collaborator

bayc commented Apr 1, 2022

@rafmudaf I made an attempt at defining some tests for the "none" models, although I just realized I forgot about the wake_turbulence "none" model. If you can look at the tests, and this form makes sense, then we can add one for the wake_turbulence "none" model as well.

@rafmudaf
Copy link
Collaborator Author

rafmudaf commented Apr 1, 2022

I think what you're intending to do in the unit test should go into a None-model regression test. It's also not a bad idea to have unit-level tests for the model functions, but that would look different in that we would try to get as close to testing only the model.function() as possible and we might throw lots of unphysical numbers at the model to test for robustness. A regression test here would check that the correct form of the grid variables and flow field variables have been initialized and are used correctly.


logging:
console:
enable: false
Copy link
Collaborator

@Bartdoekemeijer Bartdoekemeijer Apr 1, 2022

Choose a reason for hiding this comment

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

This is false while for all others its true by default. Shall we update it to true for consistency between input files?

@Bartdoekemeijer
Copy link
Collaborator

Thanks for opening this PR, @rafmudaf!

I'm finding that 00_getting_started.ipynb and 07_calc_aep_from_rose.py no longer work. All the other examples work fine, and the UncertaintyInterface and none submodels work well too. Could someone verify examples 00 and 07 on their machine?

@paulf81
Copy link
Collaborator

paulf81 commented Apr 4, 2022

hi @Bartdoekemeijer thanks for checking, can confirm that both of these fail on my (mac) machine too.

For the case of example 7, the issue seems to arise from the no_wake call:

Farm AEP (with cut_in/out specified): 57.895 GWh
Traceback (most recent call last):
  File "/Users/pfleming/Desktop/git_tools/floris/examples/07_calc_aep_from_rose.py", line 84, in <module>
    aep_no_wake = fi.get_farm_AEP(freq, no_wake=True)
  File "/Users/pfleming/Desktop/git_tools/floris/floris/tools/floris_interface.py", line 692, in get_farm_AEP
    farm_power[:, conditions_to_evaluate] = self.get_farm_power()
  File "/Users/pfleming/Desktop/git_tools/floris/floris/tools/floris_interface.py", line 607, in get_farm_power
    turbine_powers = self.get_turbine_powers()
  File "/Users/pfleming/Desktop/git_tools/floris/floris/tools/floris_interface.py", line 549, in get_turbine_powers
    turbine_type_map=self.floris.farm.turbine_type_map,
AttributeError: 'Farm' object has no attribute 'turbine_type_map'

Where line 84 is:

aep_no_wake = fi.get_farm_AEP(freq, no_wake=True)

In the notebook, I'm having trouble trying to display the 3D grid, maybe the structure of grid has changed?
image

@rafmudaf
Copy link
Collaborator Author

rafmudaf commented Apr 4, 2022

I think the problem in the notebook is that grid.x doesn't exist at that point since this is before doing the computation; that is, grid.finalize() hasn't run so only grid.x_sorted exists at that point

@rafmudaf
Copy link
Collaborator Author

rafmudaf commented Apr 4, 2022

I'm adding a GitHub Action to run the examples for each commit to check whether they run (not evaluating the results).

@Bartdoekemeijer
Copy link
Collaborator

I really like that idea, @rafmudaf! And thank you for rerunning those examples @paulf81. For 07_calc_aep_from_rose.py, the code seems to be missing self.floris.farm.turbine_type_map and a couple other variables. I'm opening a pull request now that solves the no_wake=True problems.

* Add None-model regression tests

* Remove unused data in None prepare-functions
@github-pages github-pages bot temporarily deployed to github-pages April 5, 2022 15:46 Inactive
@bayc
Copy link
Collaborator

bayc commented Apr 5, 2022

I really like that idea, @rafmudaf! And thank you for rerunning those examples @paulf81. For 07_calc_aep_from_rose.py, the code seems to be missing self.floris.farm.turbine_type_map and a couple other variables. I'm opening a pull request now that solves the no_wake=True problems.

Beyond x, y, z, and u, v, w, there are several other variables that now have _sorted versions, turbine_type_map being one of those. I'll look at the code to see if there is a proper way to initialize these values for the users before any calculation is done.

@github-pages github-pages bot temporarily deployed to github-pages April 5, 2022 22:43 Inactive
* Resolve issue with no_wake=True option

* move no_wake check to steady_state_atmospheric_condition so finalize is run when no_wake is True

* updating how no_wake is handled to have a dedicated calculate_no_wake method

* Restore profiling infrastructure (was commented)

* Update calculate_no_wake docstring

Co-authored-by: bayc <christopher.j.bay@gmail.com>
Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>
@github-pages github-pages bot temporarily deployed to github-pages April 6, 2022 16:14 Inactive
* Move grid.finalize into initialization

* Update getting-started Notebook
@github-pages github-pages bot temporarily deployed to github-pages April 6, 2022 20:46 Inactive
@rafmudaf rafmudaf merged commit a23241b into main Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Label to denote focus on v3
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants