Skip to content

Commit 6959af0

Browse files
authored
Merge pull request #1144 from NREL/develop
FLORIS v4.5
2 parents a6fc5d3 + 1b807bb commit 6959af0

File tree

56 files changed

+2212
-1123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2212
-1123
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,24 @@
33
FLORIS is a controls-focused wind farm simulation software incorporating
44
steady-state engineering wake models into a performance-focused Python
55
framework. It has been in active development at NREL since 2013 and the latest
6-
release is [FLORIS v.4.4.2](https://github.com/NREL/floris/releases/latest).
6+
release is [FLORIS v.4.5](https://github.com/NREL/floris/releases/latest).
77
Online documentation is available at https://nrel.github.io/floris.
88

99
The software is in active development and engagement with the development team
1010
is highly encouraged. If you are interested in using FLORIS to conduct studies
1111
of a wind farm or extending FLORIS to include your own wake model, please join
1212
the conversation in [GitHub Discussions](https://github.com/NREL/floris/discussions/)!
1313

14+
## WETO software
15+
16+
FLORIS is primarily developed with the support from the U.S. Department of Energy and
17+
is part of the `WETO Software Stack <https://nrel.github.io/WETOStack>`_.
18+
For more information and other integrated modeling software, see:
19+
20+
- [Portfolio Overview](https://nrel.github.io/WETOStack/portfolio_analysis/overview.html)
21+
- [Entry Guide](https://nrel.github.io/WETOStack/_static/entry_guide/index.html)
22+
- [Wind Farm Controls Workshop](https://www.youtube.com/watch?v=f-w6whxIBrA&list=PL6ksUtsZI1dwRXeWFCmJT6cEN1xijsHJz)
23+
1424
## Installation
1525

1626
**If upgrading from a previous version, it is recommended to install FLORIS v4 into a new virtual environment**.
@@ -79,7 +89,7 @@ PACKAGE CONTENTS
7989
wind_data
8090

8191
VERSION
82-
4.4.2
92+
4.5
8393

8494
FILE
8595
~/floris/floris/__init__.py

docs/_toc.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ parts:
1414
- file: intro_concepts
1515
- file: wind_data_user
1616
- file: floris_models
17+
- file: input_reference_main
18+
- file: turbine_models
19+
sections:
20+
- file: input_reference_turbine
21+
- file: operation_models_user
22+
- file: floating_wind_turbine
23+
- file: multidimensional_wind_turbine
24+
- file: turbine_library
1725
- file: advanced_concepts
1826
- file: heterogeneous_map
19-
- file: floating_wind_turbine
20-
- file: turbine_interaction
21-
- file: operation_models_user
2227
- file: layout_optimization
23-
- file: input_reference_main
24-
- file: input_reference_turbine
2528
- file: examples
2629

2730
- caption: Theory and Background

docs/api_docs.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# API Documentation
22

3-
FLORIS is divided into two primary packages.
4-
{py:mod}`floris.simulation` is the core code that models the wind turbines
5-
and wind farms. It is low-level code that generally is not accessed
6-
by typical users. {py:mod}`floris.tools` is the set of analysis routines
7-
that define, drive, and post process a simulation. This is where
8-
more users will interface with the software.
3+
FLORIS is primarily divided into the {py:mod}`floris` package, which contains the user-level API,
4+
and {py:mod}`floris.core` is the core code that models the wind turbines and wind farms.
5+
Additionally, the {py:mod}`turbine_library` package contains turbine models that ship with FLORIS;
6+
and the {py:mod}`optimization` package contains high-level optimization routines that accept and
7+
work on instantiated `FlorisModel` objects.
98

109
```{eval-rst}
1110
.. autosummary::

docs/floating_wind_turbine.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,14 @@
33

44
The FLORIS wind turbine description includes a definition of the performance curves
55
(`power` and `thrust_coefficient`) as a function of wind speed, and this lookup table is used
6-
directly in
7-
the calculation of power production for a steady-state atmospheric condition
6+
directly in the calculation of power production for a steady-state atmospheric condition
87
(wind speed and wind direction). The power curve definition typically assumes a
9-
fixed-bottom wind turbine with no active or controllable tilt. However, floating
10-
wind turbines have additional rotational degrees of freedom including pitch which
8+
fixed-bottom wind turbine with a fixed shaft tilt. However, floating
9+
wind turbines have an additional rotational degrees of freedom in the platform pitch, which
1110
adds a tilt angle to the rotor. As the turbine tilts, its performance is affected
12-
similar to a yawed condition. The turbine is no longer operating on its defined
13-
performance curve, and corrections must be included to accurately predict the power
14-
production.
11+
because the turbine is no longer operating on its defined performance curve.
1512

16-
Support for modeling this impact on a floating wind turbine were added in
17-
[PR#518](https://github.com/NREL/floris/pull/518/files) and allow for correcting the
18-
user-supplied performance curve for the average tilt. This is accomplished by including
19-
an additional input, `floating_tilt_table`, in the turbine definition which sets the
20-
steady tilt angle of the turbine based on wind speed. An interpolation is created and
21-
the tilt angle is computed for each turbine based on effective velocity. Taking into
22-
account the turbine rotor's built-in tilt, the absolute tilt change can then be used
23-
to correct the power and thrust coefficient.
24-
This tilt angle is then used directly in the selected wake models.
13+
FLORIS allows the user to correct for the tilt angle of the turbine as a function of wind speed.
14+
This is accomplished by including an additional input, `floating_tilt_table`, in the turbine definition that sets the steady tilt angle of the turbine based on wind speed. An interpolation is created and the tilt angle is computed for each turbine based on its rotor effective velocity. Taking into account the turbine rotor's built-in tilt, the absolute tilt is used to compute the power and thrust coefficient. To enable the use of the `floating_tilt_table`, the `correct_cp_ct_for_tilt` input on the turbine definition should be set to `True`.
15+
16+
The tilt angle is then used directly in the selected wake models to compute wake effects of tilted turbines.

docs/heterogeneous_map.ipynb

Lines changed: 53 additions & 155 deletions
Large diffs are not rendered by default.

docs/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ Support for python version 3.8 was dropped in FLORIS v4.3, and support for pytho
1313
See {ref}`installation` for details. FLORIS v4.3 also made the move to requiring `numpy` version 2. See the [numpy documentation for details](https://numpy.org/doc/stable/numpy_2_0_migration_guide.html).
1414
```
1515

16+
## WETO software
17+
18+
FLORIS is primarily developed with the support from the U.S. Department of Energy and
19+
is part of the `WETO Software Stack <https://nrel.github.io/WETOStack>`_.
20+
For more information and other integrated modeling software, see:
21+
22+
- [Portfolio Overview](https://nrel.github.io/WETOStack/portfolio_analysis/overview.html)
23+
- [Entry Guide](https://nrel.github.io/WETOStack/_static/entry_guide/index.html)
24+
- [Wind Farm Controls Workshop](https://www.youtube.com/watch?v=f-w6whxIBrA&list=PL6ksUtsZI1dwRXeWFCmJT6cEN1xijsHJz)
25+
1626
## Quick Start
1727

1828
FLORIS is a Python package run on the command line typically by providing

docs/input_reference_main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Main Input File Reference
22

3-
In additional to reinitializing {py:class}`FlorisInterface`, users can configure FLORIS
3+
In addition to calling the `set()` method on {py:class}`FlorisModel`, users can configure FLORIS
44
with an input file. The file must be YAML format with either "yaml" or "yml" extension.
55
The below definitions guide a user to the top, mid, and lower level parameterizations. A few
66
reference input files are available in the
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "ab10767e",
6+
"metadata": {},
7+
"source": [
8+
"# Multidimensional Wind Turbine\n",
9+
"\n",
10+
"Many external factors can affect the power and thrust curves of wind turbines. FLORIS supports the\n",
11+
"ability to define \"multidimensional\" wind turbines, where the power and thrust curves are defined\n",
12+
"as a function of external parameters. To enable this functionality, rather than defining `power`\n",
13+
"and `thrust_coefficient` as a function of `wind_speed` on the `power_thrust_table`, users should\n",
14+
"instead provide a path to a data file (described below) as `power_thrust_data_file`. Additionally,\n",
15+
"users must set the `multi_dimensional_cp_ct` option on the turbine definition to `True`.\n",
16+
"\n",
17+
"The power thrust data file should be a CSV file with the following columns:\n",
18+
"(`<external_parameter_1>`, `<external_parameter_2>`, ..., `ws`, `power`,\n",
19+
"`thrust_coefficient`). The external parameters can be any relevant factors that affect the turbine\n",
20+
"performance, and the values to be used will be specified at run time or in the FLORIS input file.\n",
21+
"For example, the external parameters could be air density, wave height, etc. The `ws` column should\n",
22+
"contain the wind speed values for specification of the power and thrust coefficient (stored in the\n",
23+
"`power` and `thrust_coefficient` columns, respectively). The wind speed, power, and thrust\n",
24+
"coefficient values should be defined for each combination of the external parameters.\n",
25+
"\n",
26+
"The user can then specify the values of the external parameters either on the FLORIS input file\n",
27+
"or using the `multidim_conditions` argument of `FlorisModel.set()`. The power and thrust coefficient\n",
28+
"are determined based on the specified conditions using a nearest-neighbor approach.\n",
29+
"\n",
30+
"The following code snippet shows an example of a multidimensional wind turbine definition and its\n",
31+
"corresponding power thrust data file."
32+
]
33+
},
34+
{
35+
"cell_type": "code",
36+
"execution_count": null,
37+
"id": "cc97a774",
38+
"metadata": {},
39+
"outputs": [],
40+
"source": [
41+
"import numpy as np\n",
42+
"import matplotlib.pyplot as plt\n",
43+
"\n",
44+
"from floris import FlorisModel, TimeSeries\n",
45+
"\n",
46+
"n_wind_speeds = 100\n",
47+
"wind_speeds = np.linspace(0.1, 30, n_wind_speeds)\n",
48+
"\n",
49+
"fmodel = FlorisModel(\"defaults\") # Defaults to NREL 5MW turbine\n",
50+
"fmodel.set(\n",
51+
" wind_data=TimeSeries(\n",
52+
" wind_directions=np.zeros(n_wind_speeds),\n",
53+
" wind_speeds=wind_speeds,\n",
54+
" turbulence_intensities=0.06\n",
55+
" ),\n",
56+
" layout_x=[0],\n",
57+
" layout_y=[0],\n",
58+
" wind_shear=0.0,\n",
59+
" turbine_type=[\"iea_15MW_floating_multi_dim_cp_ct\"],\n",
60+
" reference_wind_height=-1,\n",
61+
")\n",
62+
"\n",
63+
"# Now, we need to specify what external parameters to run the model for\n",
64+
"fmodel.set(multidim_conditions={\"Tp\": 2, \"Hs\": 1})\n",
65+
"fmodel.run()\n",
66+
"\n",
67+
"powers = fmodel.get_turbine_powers()\n",
68+
"thrust_coefficients = fmodel.get_turbine_thrust_coefficients()\n",
69+
"\n",
70+
"fig, ax = plt.subplots(2, 1, sharex=True)\n",
71+
"ax[0].plot(wind_speeds, powers, label=\"First condition\")\n",
72+
"ax[0].grid()\n",
73+
"ax[0].set_ylabel(\"Power [kW]\")\n",
74+
"ax[1].plot(wind_speeds, thrust_coefficients)\n",
75+
"ax[1].grid()\n",
76+
"ax[1].set_ylabel(\"Thrust coefficient [-]\")\n",
77+
"ax[1].set_xlabel(\"Wind speed [m/s]\")\n",
78+
"ax[1].set_xlim([0, 30])\n",
79+
"\n",
80+
"# Set a second multidimensional condition and rerun\n",
81+
"fmodel.set(multidim_conditions={\"Tp\": 4, \"Hs\": 5})\n",
82+
"fmodel.run()\n",
83+
"\n",
84+
"powers = fmodel.get_turbine_powers()\n",
85+
"thrust_coefficients = fmodel.get_turbine_thrust_coefficients()\n",
86+
"ax[0].plot(wind_speeds, powers, label=\"Second condition\")\n",
87+
"ax[0].legend(loc=\"upper left\")\n",
88+
"ax[1].plot(wind_speeds, thrust_coefficients)"
89+
]
90+
},
91+
{
92+
"cell_type": "markdown",
93+
"id": "98fd51f6",
94+
"metadata": {},
95+
"source": [
96+
"Note that this example is not meant to be represntative of a real turbine, but rather to illustrate\n",
97+
"the functionality. At this time, FLORIS only support a single external condition combination at a\n",
98+
"time, but multiple combinations can be run sequentially as is shown above."
99+
]
100+
},
101+
{
102+
"cell_type": "markdown",
103+
"id": "8c21f432",
104+
"metadata": {},
105+
"source": []
106+
}
107+
],
108+
"metadata": {
109+
"kernelspec": {
110+
"display_name": "floris",
111+
"language": "python",
112+
"name": "python3"
113+
},
114+
"language_info": {
115+
"codemirror_mode": {
116+
"name": "ipython",
117+
"version": 3
118+
},
119+
"file_extension": ".py",
120+
"mimetype": "text/x-python",
121+
"name": "python",
122+
"nbconvert_exporter": "python",
123+
"pygments_lexer": "ipython3",
124+
"version": "3.13.2"
125+
}
126+
},
127+
"nbformat": 4,
128+
"nbformat_minor": 5
129+
}

docs/operation_models_user.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,14 @@
141141
"The `\"cosine-loss\"` operation model describes the decrease in power and thrust produced by a \n",
142142
"wind turbine as it yaws (or tilts) away from the incoming wind. The thrust is reduced by a factor of \n",
143143
"$\\cos \\gamma$, where $\\gamma$ is the yaw misalignment angle, while the power is reduced by a factor \n",
144-
"of $(\\cos\\gamma)^{p_P}$, where $p_P$ is the cosine loss exponent, specified by `cosine_loss_exponent_yaw`\n",
145-
"(or `cosine_loss_exponent_tilt` for tilt angles). The power and thrust produced by the turbine\n",
144+
"of $(\\cos\\gamma)^{p_P}$, where $p_P$ is the cosine loss exponent, specified by `cosine_loss_exponent_yaw`.\n",
145+
"Similarly, the thrust and power are reduced by factors of $(\\cos \\theta / \\cos \\theta_{ref})$ and\n",
146+
"$(\\cos \\theta / \\cos \\theta_{ref})^{p_T}$, respectively, where $\\theta$ is the tilt angle, \n",
147+
"$\\theta_{ref}$ is the reference tilt angle under which the power and thrust curves are specified, and\n",
148+
"$p_T$ is the cosine loss exponent for tilt, specified by `cosine_loss_exponent_tilt`.\n",
149+
"The power and thrust produced by the turbine\n",
146150
"thus vary as a function of the turbine's yaw angle, set using the `yaw_angles` argument to \n",
147-
"`FlorisModel.set()`."
151+
"`FlorisModel.set()`, and tilt angle (if applicable, for example for floating wind turbines)."
148152
]
149153
},
150154
{

docs/references.bib

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,30 @@ @article{HeckJohlasHowland2023_yawed_adm
334334
title = {Modelling the induction, thrust and power of a yaw-misaligned actuator disk},
335335
journal = {Journal of Fluid Mechanics},
336336
}
337+
338+
@techreport{jonkman_NREL5MW_2009,
339+
title = {Definition of a 5-{MW} Reference Wind Turbine for Offshore System Development},
340+
institution = {National Renewable Energy Laboratory},
341+
url = {http://www.osti.gov/servlets/purl/947422-nhrlni/},
342+
number = {NREL/TP-500-38060},
343+
author = {Jonkman, J. and Butterfield, S. and Musial, W. and Scott, G.},
344+
year = {2009},
345+
doi = {10.2172/947422},
346+
}
347+
348+
@techreport{kainz_IEA10MW_2024,
349+
title = {{IEA}-{Wind} 740-{10MW} Reference Offshore Wind Plants},
350+
url = {https://research-hub.nrel.gov/en/publications/iea-wind-tcp-task-55-the-iea-wind-740-10-mw-reference-offshore-wi},
351+
institution = {International Energy Agency},
352+
author = {Kainz, Samuel and Quick, Julian and Souza de Alencar, Mauricio and Sanchez Perez-Moreno, Sebastian and Dykes, Katherine and Bay, Christopher and Zaaijer, Michiel B. and Bortolotti, Pietro},
353+
year = {2024},
354+
}
355+
356+
@techreport{gaertner_IEA15MW_2020,
357+
title = {{IEA} {Wind} {TCP} {Task} 37: {Definition} of the {IEA} 15-{Megawatt} Offshore Reference Wind Turbine},
358+
url = {https://research-hub.nrel.gov/en/publications/iea-wind-tcp-task-37-definition-of-the-iea-15-megawatt-offshore-r},
359+
number = {NREL/TP-5000-75698},
360+
institution = {International Energy Agency},
361+
author = {Gaertner, Evan and Sethuraman, Latha and Anderson, Benjamin and Barter, Garrett and Abbas, Nikhar and Bortolotti, Pietro and Scott, George and Feil, Roland and Shields, Matthew and Rinker, Jennifer and Zahle, Frederik and Meng, Fanzhong and Skrzypinski, Witold and Bredmose, Henrik and Dykes, Katherine and Allen, Christopher and Viselli, Anthony},
362+
year = {2020},
363+
}

0 commit comments

Comments
 (0)