diff --git a/doc/getting_started.rst b/doc/getting_started.rst index 169f336..7a28ba9 100644 --- a/doc/getting_started.rst +++ b/doc/getting_started.rst @@ -69,9 +69,9 @@ The basic usage of the windpowerlib is shown in the ModelChain example that is a To run the example you need the example weather and turbine data used: * :download:`Example weather data file <../example/weather.csv>` - * :download:`Example power curve data file <../example/data/power_curves.csv>` - * :download:`Example power coefficient curve data file <../example/data/power_coefficient_curves.csv>` - * :download:`Example nominal power data file <../example/data/turbine_data.csv>` + * :download:`Example power curve data file <../windpowerlib/data/default_turbine_data/power_curves.csv>` + * :download:`Example power coefficient curve data file <../windpowerlib/data/default_turbine_data/power_coefficient_curves.csv>` + * :download:`Example nominal power data file <../windpowerlib/data/default_turbine_data/turbine_data.csv>` 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. 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 `_ and diff --git a/doc/whatsnew/v0-2-2.rst b/doc/whatsnew/v0-2-2.rst index be840c1..455b4de 100644 --- a/doc/whatsnew/v0-2-2.rst +++ b/doc/whatsnew/v0-2-2.rst @@ -1,4 +1,4 @@ -v0.2.2 () +v0.2.2 (February 20, 2024) ++++++++++++++++++++++++++++++ * Updated the code basis to work for newer versions of python (support for python 3.6 to @@ -8,4 +8,5 @@ v0.2.2 () Contributors ############ - * Birgit Schachler \ No newline at end of file + * Birgit Schachler + * Florian Maurer \ No newline at end of file diff --git a/setup.py b/setup.py index 83f8cca..08cd24a 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ def read(fname): setup( name="windpowerlib", - version="0.2.2dev0", + version="0.2.2", description="Creating time series of wind power plants.", url="http://github.com/wind-python/windpowerlib", author="oemof developer group", @@ -28,12 +28,14 @@ def read(fname): install_requires=["pandas", "requests"], extras_require={ "dev": [ - "pytest", "jupyter", - "sphinx_rtd_theme", - "numpy", "matplotlib", + "nbsphinx", + "numpy", + "pytest", "pytest-notebook", + "sphinx >= 1.4", + "sphinx_rtd_theme", ] }, ) diff --git a/windpowerlib/__init__.py b/windpowerlib/__init__.py index f376163..5a39353 100644 --- a/windpowerlib/__init__.py +++ b/windpowerlib/__init__.py @@ -1,6 +1,6 @@ __copyright__ = "Copyright oemof developer group" __license__ = "MIT" -__version__ = "0.2.2dev0" +__version__ = "0.2.2" from .wind_turbine import WindTurbine # noqa: F401 from .data import get_turbine_types # noqa: F401 diff --git a/windpowerlib/power_output.py b/windpowerlib/power_output.py index 6c0e1f7..35d6e42 100644 --- a/windpowerlib/power_output.py +++ b/windpowerlib/power_output.py @@ -178,6 +178,7 @@ def power_curve_density_correction( Calculates the turbine power output using a density corrected power curve. This function is carried out when the parameter `density_correction` of an instance of the :class:`~.modelchain.ModelChain` class is True. + Parameters ---------- wind_speed : :pandas:`pandas.Series` or numpy.array @@ -190,17 +191,20 @@ def power_curve_density_correction( `power_curve_wind_speeds`. density : :pandas:`pandas.Series` or numpy.array Density of air at hub height in kg/m³. + Returns ------- :pandas:`pandas.Series` or numpy.array Electrical power output of the wind turbine in W. Data type depends on type of `wind_speed`. + Notes ----- The following equation is used for the site specific power curve wind speeds [1]_ [2]_ [3]_: - .. math:: v_{site}=v_{std}\cdot\left(\frac{\rho_0} - {\rho_{site}}\right)^{p(v)} + + .. math:: v_{site}=v_{std}\cdot\left(\frac{\rho_0}{\rho_{site}}\right)^{p(v)} + with: .. math:: p=\begin{cases} \frac{1}{3} & v_{std} \leq 7.5\text{ m/s}\\ @@ -208,7 +212,9 @@ def power_curve_density_correction( \text{ m/s}` or numpy.array or float Roughness length. If given and `hellman_exponent` is None: - `hellman_exponent`=1 / ln(hub_height/roughness_length), - otherwise `hellman_exponent`=1/7. Default: None. + `hellman_exponent` = 1 / ln(hub_height/roughness_length), + otherwise `hellman_exponent` = 1/7. Default: None. hellman_exponent : None or float The Hellman exponent, which combines the increase in wind speed due to stability of atmospheric conditions and surface roughness into one constant. If None and roughness length is given - `hellman_exponent`=1 / ln(hub_height/roughness_length), - otherwise `hellman_exponent`=1/7. Default: None. + `hellman_exponent` = 1 / ln(hub_height/roughness_length), + otherwise `hellman_exponent` = 1/7. Default: None. Returns ------- @@ -152,7 +152,7 @@ def hellman( For the Hellman exponent :math:`\alpha` many studies use a value of 1/7 for onshore and a value of 1/9 for offshore. The Hellman exponent can also - be calulated by the following equation [2]_ [3]_: + be calculated by the following equation [2]_ [3]_: .. math:: \alpha=\frac{1}{\ln\left(\frac{h_{hub}}{z_0} \right)} @@ -165,12 +165,12 @@ def hellman( References ---------- .. [1] Sharp, E.: "Spatiotemporal disaggregation of GB scenarios depicting - increased wind capacity and electrified heat demand in dwellings". - UCL, Energy Institute, 2015, p. 83 + increased wind capacity and electrified heat demand in dwellings". + UCL, Energy Institute, 2015, p. 83 .. [2] Hau, E.: "Windkraftanlagen - Grundlagen, Technik, Einsatz, - Wirtschaftlichkeit". 4. Auflage, Springer-Verlag, 2008, p. 517 + Wirtschaftlichkeit". 4. Auflage, Springer-Verlag, 2008, p. 517 .. [3] Quaschning V.: "Regenerative Energiesysteme". München, Hanser - Verlag, 2011, p. 279 + Verlag, 2011, p. 279 """ if hellman_exponent is None: