Skip to content

Commit 8f11ea4

Browse files
authored
Merge pull request #139 from wind-python/features/make_ready_for_release_022
Features/make ready for release 022
2 parents 5af422d + d45c158 commit 8f11ea4

File tree

6 files changed

+42
-28
lines changed

6 files changed

+42
-28
lines changed

doc/getting_started.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ The basic usage of the windpowerlib is shown in the ModelChain example that is a
6969
To run the example you need the example weather and turbine data used:
7070

7171
* :download:`Example weather data file <../example/weather.csv>`
72-
* :download:`Example power curve data file <../example/data/power_curves.csv>`
73-
* :download:`Example power coefficient curve data file <../example/data/power_coefficient_curves.csv>`
74-
* :download:`Example nominal power data file <../example/data/turbine_data.csv>`
72+
* :download:`Example power curve data file <../windpowerlib/data/default_turbine_data/power_curves.csv>`
73+
* :download:`Example power coefficient curve data file <../windpowerlib/data/default_turbine_data/power_coefficient_curves.csv>`
74+
* :download:`Example nominal power data file <../windpowerlib/data/default_turbine_data/turbine_data.csv>`
7575

7676
Furthermore, you have to install the windpowerlib and to run the notebook you also need to install `notebook` using pip3. To launch jupyter notebook type ``jupyter notebook`` in the terminal.
7777
This will open a browser window. Navigate to the directory containing the notebook to open it. See the jupyter notebook quick start guide for more information on `how to install <http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/install.html>`_ and

doc/whatsnew/v0-2-2.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v0.2.2 ()
1+
v0.2.2 (February 20, 2024)
22
++++++++++++++++++++++++++++++
33

44
* Updated the code basis to work for newer versions of python (support for python 3.6 to
@@ -8,4 +8,5 @@ v0.2.2 ()
88

99
Contributors
1010
############
11-
* Birgit Schachler
11+
* Birgit Schachler
12+
* Florian Maurer

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def read(fname):
88

99
setup(
1010
name="windpowerlib",
11-
version="0.2.2dev0",
11+
version="0.2.2",
1212
description="Creating time series of wind power plants.",
1313
url="http://github.com/wind-python/windpowerlib",
1414
author="oemof developer group",
@@ -28,12 +28,14 @@ def read(fname):
2828
install_requires=["pandas", "requests"],
2929
extras_require={
3030
"dev": [
31-
"pytest",
3231
"jupyter",
33-
"sphinx_rtd_theme",
34-
"numpy",
3532
"matplotlib",
33+
"nbsphinx",
34+
"numpy",
35+
"pytest",
3636
"pytest-notebook",
37+
"sphinx >= 1.4",
38+
"sphinx_rtd_theme",
3739
]
3840
},
3941
)

windpowerlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__copyright__ = "Copyright oemof developer group"
22
__license__ = "MIT"
3-
__version__ = "0.2.2dev0"
3+
__version__ = "0.2.2"
44

55
from .wind_turbine import WindTurbine # noqa: F401
66
from .data import get_turbine_types # noqa: F401

windpowerlib/power_output.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ def power_curve_density_correction(
178178
Calculates the turbine power output using a density corrected power curve.
179179
This function is carried out when the parameter `density_correction` of an
180180
instance of the :class:`~.modelchain.ModelChain` class is True.
181+
181182
Parameters
182183
----------
183184
wind_speed : :pandas:`pandas.Series<series>` or numpy.array
@@ -190,25 +191,30 @@ def power_curve_density_correction(
190191
`power_curve_wind_speeds`.
191192
density : :pandas:`pandas.Series<series>` or numpy.array
192193
Density of air at hub height in kg/m³.
194+
193195
Returns
194196
-------
195197
:pandas:`pandas.Series<series>` or numpy.array
196198
Electrical power output of the wind turbine in W.
197199
Data type depends on type of `wind_speed`.
200+
198201
Notes
199202
-----
200203
The following equation is used for the site specific power curve wind
201204
speeds [1]_ [2]_ [3]_:
202-
.. math:: v_{site}=v_{std}\cdot\left(\frac{\rho_0}
203-
{\rho_{site}}\right)^{p(v)}
205+
206+
.. math:: v_{site}=v_{std}\cdot\left(\frac{\rho_0}{\rho_{site}}\right)^{p(v)}
207+
204208
with:
205209
.. math:: p=\begin{cases}
206210
\frac{1}{3} & v_{std} \leq 7.5\text{ m/s}\\
207211
\frac{1}{15}\cdot v_{std}-\frac{1}{6} & 7.5
208212
\text{ m/s}<v_{std}<12.5\text{ m/s}\\
209213
\frac{2}{3} & \geq 12.5 \text{ m/s}
210214
\end{cases},
215+
211216
v: wind speed [m/s], :math:`\rho`: density [kg/m³]
217+
212218
:math:`v_{std}` is the standard wind speed in the power curve
213219
(:math:`v_{std}`, :math:`P_{std}`),
214220
:math:`v_{site}` is the density corrected wind speed for the power curve
@@ -217,17 +223,19 @@ def power_curve_density_correction(
217223
and :math:`\rho_{site}` the density at site conditions (and hub height).
218224
It is assumed that the power output for wind speeds above the maximum
219225
and below the minimum wind speed given in the power curve is zero.
226+
220227
References
221228
----------
222229
.. [1] Svenningsen, L.: "Power Curve Air Density Correction And Other
223-
Power Curve Options in WindPRO". 1st edition, Aalborg,
224-
EMD International A/S , 2010, p. 4
230+
Power Curve Options in WindPRO". 1st edition, Aalborg,
231+
EMD International A/S , 2010, p. 4
225232
.. [2] Svenningsen, L.: "Proposal of an Improved Power Curve Correction".
226-
EMD International A/S , 2010
233+
EMD International A/S , 2010
227234
.. [3] Biank, M.: "Methodology, Implementation and Validation of a
228-
Variable Scale Simulation Model for Windpower based on the
229-
Georeferenced Installation Register of Germany". Master's Thesis
230-
at Reiner Lemoine Institute, 2014, p. 13
235+
Variable Scale Simulation Model for Windpower based on the
236+
Georeferenced Installation Register of Germany". Master's Thesis
237+
at Reiner Lemoine Institute, 2014, p. 13
238+
231239
"""
232240
if density is None:
233241
raise TypeError(
@@ -269,6 +277,7 @@ def _get_power_output(
269277
wind_speed, power_curve_wind_speeds, density, power_curve_values
270278
):
271279
"""Get the power output at each timestep using only numpy to speed up performance
280+
272281
Parameters
273282
----------
274283
wind_speed : :numpy:`numpy.ndarray`
@@ -281,10 +290,12 @@ def _get_power_output(
281290
power_curve_values : :numpy:`numpy.ndarray`
282291
Power curve values corresponding to wind speeds in
283292
`power_curve_wind_speeds`.
293+
284294
Returns
285295
-------
286296
:numpy:`numpy.array`
287297
Electrical power output of the wind turbine in W.
298+
288299
"""
289300
# Calculate the power curves for each timestep using vectors
290301
# NOTE: power_curves_per_ts.shape = [len(wind_speed), len(density)]

windpowerlib/wind_speed.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def logarithmic_profile(
3636
Roughness length.
3737
obstacle_height : float
3838
Height of obstacles in the surrounding area of the wind turbine. Set
39-
`obstacle_height` to zero for wide spread obstacles. Default: 0.
39+
`obstacle_height` to zero for widespread obstacles. Default: 0.
4040
4141
Returns
4242
-------
@@ -122,14 +122,14 @@ def hellman(
122122
Hub height of wind turbine.
123123
roughness_length : :pandas:`pandas.Series<series>` or numpy.array or float
124124
Roughness length. If given and `hellman_exponent` is None:
125-
`hellman_exponent`=1 / ln(hub_height/roughness_length),
126-
otherwise `hellman_exponent`=1/7. Default: None.
125+
`hellman_exponent` = 1 / ln(hub_height/roughness_length),
126+
otherwise `hellman_exponent` = 1/7. Default: None.
127127
hellman_exponent : None or float
128128
The Hellman exponent, which combines the increase in wind speed due to
129129
stability of atmospheric conditions and surface roughness into one
130130
constant. If None and roughness length is given
131-
`hellman_exponent`=1 / ln(hub_height/roughness_length),
132-
otherwise `hellman_exponent`=1/7. Default: None.
131+
`hellman_exponent` = 1 / ln(hub_height/roughness_length),
132+
otherwise `hellman_exponent` = 1/7. Default: None.
133133
134134
Returns
135135
-------
@@ -152,7 +152,7 @@ def hellman(
152152
153153
For the Hellman exponent :math:`\alpha` many studies use a value of 1/7 for
154154
onshore and a value of 1/9 for offshore. The Hellman exponent can also
155-
be calulated by the following equation [2]_ [3]_:
155+
be calculated by the following equation [2]_ [3]_:
156156
157157
.. math:: \alpha=\frac{1}{\ln\left(\frac{h_{hub}}{z_0} \right)}
158158
@@ -165,12 +165,12 @@ def hellman(
165165
References
166166
----------
167167
.. [1] Sharp, E.: "Spatiotemporal disaggregation of GB scenarios depicting
168-
increased wind capacity and electrified heat demand in dwellings".
169-
UCL, Energy Institute, 2015, p. 83
168+
increased wind capacity and electrified heat demand in dwellings".
169+
UCL, Energy Institute, 2015, p. 83
170170
.. [2] Hau, E.: "Windkraftanlagen - Grundlagen, Technik, Einsatz,
171-
Wirtschaftlichkeit". 4. Auflage, Springer-Verlag, 2008, p. 517
171+
Wirtschaftlichkeit". 4. Auflage, Springer-Verlag, 2008, p. 517
172172
.. [3] Quaschning V.: "Regenerative Energiesysteme". München, Hanser
173-
Verlag, 2011, p. 279
173+
Verlag, 2011, p. 279
174174
175175
"""
176176
if hellman_exponent is None:

0 commit comments

Comments
 (0)