Skip to content

Commit f4a64cc

Browse files
committed
add initial version from the feedinlib
1 parent 10cdead commit f4a64cc

File tree

18 files changed

+1261
-3
lines changed

18 files changed

+1261
-3
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ instance/
6161
.scrapy
6262

6363
# Sphinx documentation
64-
docs/_build/
64+
doc/_build/
6565

6666
# PyBuilder
6767
target/
@@ -82,8 +82,9 @@ celerybeat-schedule
8282
venv/
8383
ENV/
8484

85-
# Spyder project settings
85+
# IDEs
8686
.spyderproject
87+
.idea/
8788

8889
# Rope project settings
8990
.ropeproject

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.rst

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
The windpowerlib is designed to calculate feedin time series of wind power plants. The windpowerlib is an out-take from the feedinlib (windpower and pv) to build up a community concentrating on wind power models.
2+
3+
The windpowerlib is ready to use but may have some teething troubles. The used model is still very simple but we found some new contributors and the windpowerlib will improve soon. If you are interested in wind models and want to improve the existing model, publish an alternative model or extend it to wind farms do not hesitate to contact us.
4+
5+
.. contents:: `Table of contents`
6+
:depth: 1
7+
:local:
8+
:backlinks: top
9+
10+
Introduction
11+
============
12+
13+
Having weather data sets you can use the windpowerlib to calculate the electrical output of common wind power plants. Basic parameters for many manufacturers are provided with the library so that you can start directly using one of these parameter sets. Of course you are free to add your own parameter set.
14+
15+
The cp-values for the wind turbines are provided by the Reiner Lemoine Institut and can be found here:
16+
17+
* http://vernetzen.uni-flensburg.de/~git/cp_values.csv
18+
19+
20+
Actual Release
21+
~~~~~~~~~~~~~~
22+
23+
Download/Install: https://pypi.python.org/pypi/windpowerlib/
24+
25+
Documentation: http://pythonhosted.org/windpowerlib/
26+
27+
Developing Version
28+
~~~~~~~~~~~~~~~~~~
29+
30+
Clone/Fork: https://github.com/wind-python/windpowerlib
31+
32+
Documentation: http://windpowerlib.readthedocs.org/en/latest/
33+
34+
As the windpowerlib started with contributors from the oemof developer group we use the same developer rules: http://oemof.readthedocs.io/en/stable/developer_notes.html
35+
36+
37+
Installation
38+
============
39+
40+
Using the windpowerlib
41+
~~~~~~~~~~~~~~~~~~~~~~~
42+
43+
So far, the windpowerlib is mainly tested on python 3.4 but seems to work down
44+
to 2.7.
45+
46+
Install the windpowerlib using pip3.
47+
48+
::
49+
50+
pip3 install windpowerlib
51+
52+
Developing the Windpowerlib
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
55+
If you have push rights clone this repository to your local system.
56+
57+
::
58+
59+
git clone git@github.com:oemof/windpower.git
60+
61+
If you do not have push rights, fork the project at github, clone your personal fork to your system and send a pull request.
62+
63+
If the project is cloned you can install it using pip3 with the -e flag. Using this installation, every change is applied directly.
64+
65+
::
66+
67+
pip3 install -e <path/to/the/windpowerlib/root/dir>
68+
69+
70+
Optional Packages
71+
~~~~~~~~~~~~~~~~~
72+
73+
To see the plots of the example file one should install the matplotlib package.
74+
75+
Matplotlib can be installed using pip3 but some Linux users reported that it is easier and more stable to use the pre-built packages of your Linux distribution.
76+
77+
http://matplotlib.org/users/installing.html
78+
79+
Example
80+
~~~~~~~~~~~~~~~~~~~~~~~~
81+
Download the example file and execute it:
82+
83+
Path missing!
84+
85+
86+
Basic Usage
87+
===========
88+
89+
You need three steps to get a time series.
90+
91+
Warning
92+
~~~~~~~
93+
Be accurate with the units. In the example all units are given without a prefix.
94+
* pressure [Pa]
95+
* wind speed [m/s]
96+
* installed capacity [W]
97+
* nominal power [W]
98+
* area [m²]
99+
* temperature [°C]
100+
101+
You can also use kW instead of W but you have to make sure that all units are changed in the same way.
102+
103+
1. Initialise your Turbine or Module
104+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105+
106+
To initialise your specific turbine you need a dictionary that contains your basic parameters.
107+
108+
The most import parameter is the name of the turbine to get technical parameters from the provided libraries. Use the *get_wind_pp_types* function to get a list of all available converter types.
109+
110+
.. code-block:: python
111+
112+
from windpowerlib import basicmodel
113+
basicmodel.get_wind_pp_types()
114+
115+
The other parameters are related to location of the plant like diameter of the rotor or the hub height. The existing model needs the following parameters:
116+
117+
* h_hub: height of the hub in meters
118+
* d_rotor: diameter of the rotor in meters
119+
* wind_conv_type: Name of the wind converter according to the list in the csv file
120+
121+
.. code:: python
122+
123+
your_wind_turbine = basicmodel.SimpleWindTurbine(**your_parameter_set)
124+
125+
If you pass a valid model the nominal_power and the cp-values are read from a file. If you want to use your own converter you can pass your own cp-series and nominal power instead of the converter type. This can be done with a dictionary (as shown above) or directly.
126+
127+
.. code:: python
128+
129+
your_wind_turbine = basicmodel.SimpleWindTurbine(cp_values=my_cp_values,
130+
nominal_power=my_nominal_power,
131+
d_rotor=my_d_rotor,
132+
h_hub=my_h_hub)
133+
134+
2. Get your Feedin Time Series
135+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136+
137+
To get your time series you have to pass a weather DataFrame (or dictionary) to your model.The DataFrame needs to have pressure, wind speed, temperature and the roughness length. The following names are used:
138+
139+
* 'pressure'
140+
* 'temp_air'
141+
* 'v_wind'
142+
* 'z0'
143+
144+
In an additional dictionary the height of the weather data has to be defined. The example shows a dictionary for the coasdat2 weather data set:
145+
146+
.. code:: python
147+
148+
coastDat2 = {
149+
'dhi': 0,
150+
'dirhi': 0,
151+
'pressure': 0,
152+
'temp_air': 2,
153+
'v_wind': 10,
154+
'Z0': 0}
155+
156+
If your weather DataFrame has different column names you have to rename them. This can easily be done by using a conversion dictionary:
157+
158+
.. code:: python
159+
160+
name_dc = {
161+
'your pressure data set': 'pressure',
162+
'your ambient temperature': 'temp_air',
163+
'your wind speed': 'v_wind',
164+
'your roughness length': 'z0'}
165+
166+
your_weather_DataFrame.rename(columns=name_dc)
167+
168+
Now you can pass the weather data to the output method:
169+
170+
.. code:: python
171+
172+
your_wind_turbine.turbine_power_output(weather=weather_df, data_height=coastDat2)
173+
174+
You will get the output of one wind_turbine in [W] if you followed the united recommendations from above.

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.1dev"

doc/api/modules.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
windpowerlib
2+
============
3+
4+
.. toctree::
5+
:maxdepth: 8
6+
7+
windpowerlib

doc/api/windpowerlib.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
windpowerlib package
2+
====================
3+
4+
Submodules
5+
----------
6+
7+
windpowerlib.basicmodel module
8+
------------------------------
9+
10+
.. automodule:: windpowerlib.basicmodel
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
16+
Module contents
17+
---------------
18+
19+
.. automodule:: windpowerlib
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:

0 commit comments

Comments
 (0)