Skip to content

Commit

Permalink
Update reference wind turbines in the default turbine library (#771)
Browse files Browse the repository at this point in the history
* add power to 5MW model, matches https://github.com/NREL/floris/blob/main/floris/turbine_library/nrel_5MW.yaml with extension for before cut in and after cut out. Rename thrust field.

* Removing Cp interp and replacing with direct power interp; updating thrust_coefficient key name.

* Convert to W for power_interp; remove ref air density from power calc (tests need updating yet).

* Minor updates for plot axes---contains temporary limitation to NREL 5MW turbine only, will remove prior to merge into v4 branch.

* Updating 15mw based on https://github.com/IEAWindTask37/IEA-15-240-RWT/blob/master/Documentation/IEA-15-240-RWT_tabular.xlsx

* 10mw updated.

* Updating turbine curve conversion utility and example.

* Utility for converting from v3 turbine models to v4.

* Ruff and isort.

* Changing names to check out v3 versions.

* Renaming again...

* Converting old models over.

* So that tests run, using v4 5MW.

* Updates to test_build_turbine_dict.

* Updating conftest, test_power() to reflect absolute power in turbine yaml.

* air density removed from power() calls in reg tests.

* Reinstating accidentally overwritten file.

* Convert from `ref_density_cp_ct` to `ref_air_density`.

* `ref_tilt` replaces `ref_tilt_cp_ct`

* Ruff, isort; remove AIR_DENSITY from turbine_unit_test.test_power().

* Clearing empty lines.

* Check for smoothness; not yet passing `smooth enough` test.

* Tests passing for smoothness.

* Converter prints warning if nonsmooth; added handling for no R4.

* Update build_turbine_dict test for clarity and simplicity. Ruff, isort.

* Bugfixes in example after semantic changes to build_turbine_dict.

* Moving turbine into its own simulation directory; updating names of interp functions.

* SimpleTurbine power module.

* Turbine submodule pieces.

* Added thrust coefficient to SimpleTurbine.

* Adding extra arguments to Ct(), power(), and axial_induction().

* Updating turbine_unit_test for new layout.

* Add handling for different model types.

* cosine loss model option, but currently matches simple.

* Moving velocities to own file (may need renaming).

* Temp; runs, still todo items for power().

* Now passing all the way through the power calculation.

* Updating thrust model to match power.

* Update imports in tests.

* Passing arguments as kwargs.

* cosine loss model; move various turbine parameters inside power_thrust_table; call power() and thrust_coefficient() with kwargs.

* Update tests calling power; turbine model structure.

* emg reg tests failing.'

* Jensen reg passes.

* TB reg tests pass.

* CC, gauss reg tests good.

* Fix bug in how tilt_angles are passed through.

* Turbine building utilities updated.

* removing unnecessary attributes from Farm class.'

* Updated axial_induction() keywords for consistency.

* Note to return to axial_induction() model.

* rename rotor_effective_velocity.py

* Move rotor velocity tests to individual module.

* tests for air density correction.

* add base class for turbine models; add tests.

* init test passes.

* test_power, test_Ct now passing.

* axial_induction passes.

* Remove ref_tilt argument from Ct()

* isort, ruff.

* Remove multidim utilities and their imports.

* working through example 30 to go through full multidim example.

* example 30 now runs. Can likely remove commented out code, but will leave for the time being and clean up later.

* 31 now runs.

* isort.

* End of file.

* Moving multidim functionality onto turbine.py

* Remove turbine_multi_dim.py

* Missed a reference...

* ruff, isort.

* removing unneeded TODOs.

* moving turbine utilities.

* Move multidim selector to utilities, model map to top of turbine.py

* Rename power_interp power_function throughout.

* comments for turbine.py

* Adding descriptions for the turbine submodels.

* fix end of file.

* Disclaimers and copyrights.

* removing sorting of uneeded properties from full_flow solvers.

* Inherit from correct base class.

* Turbine library updates for examples 17 and 18.

* Example 24.

* ex. 33.

* ruff.

* Return nrel_5MW.yaml to converted (rather than updated) version.

* Bugfix: include generator efficiency in power calculation.

* updated defs based on FAST data.

* Include correct efficiency, coning-corrected rotor diameter.

* Moving into subdirs.

* remove test for x_20; add symlinks for nrel_5mw legacy and converted.

* Update conftests; many reg tests failing.

* Updating power outputs in turbine unit tests.

* wake model reg tests updated.

* fi, none reg tests updated.

* Remove temporary filter in 18; update rotor diameter in 32.

* Rename to converted_from_v3 for clarity.

* Remove unused code

* Remove extra lines at end of file

* Move rotor velocity module up to floris.simulation

* Consolidate turbine models into one module

* Move turbine preprocessing to floris.turbine_library

* Fix line length linting and isort errors

* Update API for turbine previewer

* Prevent test file from being exported

* Bug fix in example

* Remove duplicate code

* Rename Farm setup function to reflect the data

* Move axial_induction functionality to submodels; propagate changes.

* add axial induction model tests.

* Rename Ct functions throughout.

* Update fi method call.

* Line length.

* Missed the constructors.

* Rename to .

* Remove unused library in dependencies

This was previously used for the multidimension turbine, but it has since been consolidated and flatten_dict isn't used

* Remove unused import

* Fix incorrect type hints

* redeleting files that got mixed up on v4 merge.

* Incorporating electrical efficiency.

* Store legacy and converted v3 NREL 5MWs for testing.

* Remove archived legacy v3 models; converted models; and copies of updated models.

* Update floating turbine examples to new definition data.

* Update tests to avoid need for extra data files; currently fails due to data disconnect; update defaults in build_cosine_loss_turbine_dict to match updated NREL 5MW.

* Remove unneeded turbine models for testing; update v3 test data to match v4 NREL 5MW model and pass tests.

* Update turbine previewer with new turbine paths

* provide url to public data.

---------

Co-authored-by: Rafael M Mudafort <[email protected]>
  • Loading branch information
misi9170 and rafmudaf authored Jan 16, 2024
1 parent 8e6fb6b commit e08f266
Show file tree
Hide file tree
Showing 36 changed files with 1,650 additions and 3,376 deletions.
59 changes: 31 additions & 28 deletions docs/turbine_interaction.ipynb

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions examples/18_check_turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@
if t.suffix == ".yaml" and ("multi_dim" not in t.stem)
]

# TEMPORARY
print(turbines)
turbines = [
t for t in turbines
if "converted" not in t
if "updated" not in t
if "legacy" not in t
if t != "x_20MW"
]
print(turbines)
# END TEMPORARY

# Declare a set of figures for comparing cp and ct across models
fig_pow_ct, axarr_pow_ct = plt.subplots(2,1,sharex=True,figsize=(10,10))

Expand Down
2 changes: 1 addition & 1 deletion examples/32_plot_velocity_deficit_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def annotate_coordinate_system(x_origin, y_origin, quiver_length):
plt.text(x[1], y[1], '$x_2$', bbox={'facecolor': 'white'})

if __name__ == '__main__':
D = 126.0 # Turbine diameter
D = 125.88 # Turbine diameter
hub_height = 90.0
homogeneous_wind_speed = 8.0

Expand Down
247 changes: 128 additions & 119 deletions examples/inputs_floating/turbine_files/nrel_5MW_fixed.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
turbine_type: 'nrel_5MW_floating'
generator_efficiency: 1.0
generator_efficiency: 0.944
hub_height: 90.0
rotor_diameter: 126.0
rotor_diameter: 125.88
TSR: 8.0
correct_cp_ct_for_tilt: True # Apply tilt correction to cp/ct
power_thrust_table:
Expand All @@ -12,158 +12,167 @@ power_thrust_table:
power:
- 0.0
- 0.0
- 0.0
- 36.722155848902254
- 94.65678115354163
- 170.596391826316
- 267.74933496419163
- 387.64681352354114
- 533.9617151673435
- 707.4062402827329
- 909.9965782677073
- 1142.7197798534328
- 1407.4994184495558
- 1707.1272243371227
- 2047.3355806543098
- 2430.5778091805637
- 2858.3081150622215
- 3329.100627354195
- 3842.9755943182267
- 4403.86140594055
- 4999.993508066915
- 4999.99850473839
- 4999.997854617397
- 5000.00304890274
- 5000.002113339491
- 4999.997282778227
- 5000.002243172759
- 5000.000360590384
- 5000.009074693787
- 4999.987262704901
- 5000.007345811091
- 5000.006875165497
- 4999.994990648268
- 4999.97705933755
- 4999.983698972648
- 4999.991318085188
- 5000.024022703328
- 5000.016589748782
- 5000.025709581146
- 4999.944891236294
- 5000.035324880168
- 4999.967955734346
- 5000.013248451465
- 5000.063199891701
- 5000.068982245371
- 4999.9325188896555
- 5000.011035557985
- 5000.012771123277
- 4717.243379938609
- 40.518011517569214
- 177.67162506419703
- 403.900880943964
- 737.5889584824021
- 1187.1774030611875
- 1239.245945375778
- 1292.5184293723503
- 1347.3213147477102
- 1403.2573725578948
- 1460.7011898730707
- 1519.6419125979983
- 1580.174365096404
- 1642.1103166918167
- 1705.758292831
- 1771.1659528893977
- 2518.553107505315
- 3448.381605840943
- 3552.140809000129
- 3657.9545431794127
- 3765.121299313842
- 3873.928844315059
- 3984.4800226955504
- 4096.582833096852
- 4210.721306623712
- 4326.154305853405
- 4443.395565353604
- 4562.497934188341
- 4683.419890251577
- 4806.164748311019
- 4929.931918769215
- 5000.920541636473
- 5000.155331018289
- 4999.981249947396
- 4999.95577837709
- 4999.977954833183
- 4999.99729673573
- 5000.00107322333
- 5000.006250888532
- 5000.005783964932
- 5000.0180481355455
- 5000.00295266134
- 5000.015689533812
- 5000.027006739212
- 5000.015694513332
- 5000.037874470919
- 5000.021829556129
- 5000.047786595209
- 5000.006722827633
- 5000.003398457957
- 5000.044012521576
- 0.0
- 0.0
thrust_coefficient:
- 0.0
- 0.0
- 0.0
- 0.99
- 0.99
- 0.97373036
- 0.92826162
- 0.89210543
- 0.86100905
- 0.835423
- 0.81237673
- 0.79225789
- 0.77584769
- 0.7629228
- 0.76156073
- 0.76261984
- 0.76169723
- 0.75232027
- 0.74026851
- 0.72987175
- 0.70701647
- 0.54054532
- 0.45509459
- 0.39343381
- 0.34250785
- 0.30487242
- 0.27164979
- 0.24361964
- 0.21973831
- 0.19918151
- 0.18131868
- 0.16537679
- 0.15103727
- 0.13998636
- 0.1289037
- 0.11970413
- 0.11087113
- 0.10339901
- 0.09617888
- 0.09009926
- 0.08395078
- 0.0791188
- 0.07448356
- 0.07050731
- 0.06684119
- 0.06345518
- 0.06032267
- 0.05741999
- 0.05472609
- 1.132034888
- 0.999470963
- 0.917697381
- 0.860849503
- 0.815371198
- 0.811614904
- 0.807939328
- 0.80443352
- 0.800993851
- 0.79768116
- 0.794529244
- 0.791495834
- 0.788560434
- 0.787217182
- 0.787127977
- 0.785839257
- 0.783812219
- 0.783568108
- 0.783328285
- 0.781194418
- 0.777292539
- 0.773464375
- 0.769690236
- 0.766001924
- 0.762348072
- 0.758760824
- 0.755242872
- 0.751792927
- 0.748434131
- 0.745113997
- 0.717806682
- 0.672204789
- 0.63831272
- 0.610176496
- 0.585456847
- 0.563222111
- 0.542912273
- 0.399312061
- 0.310517829
- 0.248633226
- 0.203543725
- 0.169616419
- 0.143478955
- 0.122938861
- 0.106515296
- 0.093026095
- 0.081648606
- 0.072197368
- 0.064388275
- 0.057782745
- 0.0
- 0.0
wind_speed:
- 0.0
- 2.0
- 2.5
- 2.9
- 3.0
- 3.5
- 4.0
- 4.5
- 5.0
- 5.5
- 6.0
- 6.5
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 7.5
- 7.6
- 7.7
- 7.8
- 7.9
- 8.0
- 8.5
- 9.0
- 9.5
- 10.0
- 10.1
- 10.2
- 10.3
- 10.4
- 10.5
- 10.6
- 10.7
- 10.8
- 10.9
- 11.0
- 11.1
- 11.2
- 11.3
- 11.4
- 11.5
- 11.6
- 11.7
- 11.8
- 11.9
- 12.0
- 12.5
- 13.0
- 13.5
- 14.0
- 14.5
- 15.0
- 15.5
- 16.0
- 16.5
- 17.0
- 17.5
- 18.0
- 18.5
- 19.0
- 19.5
- 20.0
- 20.5
- 21.0
- 21.5
- 22.0
- 22.5
- 23.0
- 23.5
- 24.0
- 24.5
- 25.0
- 25.01
- 25.02
- 25.1
- 50.0
floating_tilt_table:
tilt:
Expand Down
Loading

0 comments on commit e08f266

Please sign in to comment.