Skip to content

Commit 8147e5c

Browse files
committed
Add basic turbine definition to README
1 parent 7cc5a8e commit 8147e5c

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed

README.rst

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,14 @@ You can also look at the examples in the `Examples section <http://windpowerlib.
8585
Wind turbine data
8686
==================
8787

88+
The windpowerlib provides data of many wind turbines but it is also possible to
89+
use your own turbine data.
90+
91+
Use internal data
92+
~~~~~~~~~~~~~~~~~
93+
8894
The windpowerlib provides `wind turbine data <https://github.com/wind-python/windpowerlib/tree/master/windpowerlib/oedb>`_
89-
(power curves, hub heights, etc.) for a large set of wind turbines. Have a look at the `example <http://windpowerlib.readthedocs.io/en/stable/modelchain_example_notebook.html#Initialize-wind-turbine>`_ on how
95+
(power curves, hub heights, etc.) for a large set of wind turbines. See `Initialize wind turbine` in :ref:`examples_section_label` on how
9096
to use this data in your simulations.
9197

9298
The dataset is hosted and maintained on the `OpenEnergy database <https://openenergy-platform.org/dataedit/>`_ (oedb).
@@ -97,9 +103,61 @@ To update your local files with the latest version of the `oedb turbine library
97103
from windpowerlib.wind_turbine import load_turbine_data_from_oedb
98104
load_turbine_data_from_oedb()
99105
106+
If you find your turbine in the database it is very easy to use it in the
107+
windpowerlib
108+
109+
.. code:: python
110+
111+
from windpowerlib import WindTurbine
112+
enercon_e126 = {
113+
"turbine_type": "E-126/4200", # turbine type as in register
114+
"hub_height": 135, # in m
115+
}
116+
e126 = WindTurbine(**enercon_e126)
117+
100118
We would like to encourage anyone to contribute to the turbine library by adding turbine data or reporting errors in the data.
101119
See `here <https://github.com/OpenEnergyPlatform/data-preprocessing/issues/28>`_ for more information on how to contribute.
102120

121+
Use your own turbine data
122+
~~~~~~~~~~~~~~~~~~~~~~~~~
123+
124+
It is possible to use your own power curve. However, the most sustainable way
125+
is to send us the data to be included in the windpowerlib and to be available
126+
for all users. This may not be possible in all cases.
127+
128+
Assuming the data files looks like this:
129+
130+
.. code::
131+
132+
wind,power
133+
0.0,0.0
134+
3.0,39000.0
135+
5.0,270000.0
136+
10.0,2250000.0
137+
15.0,4500000.0
138+
25.0,4500000.0
139+
140+
You can use pandas to read the file and pass it to the turbine dictionary. I
141+
you have basic knowledge of pandas it is easy to use any kind of data file.
142+
143+
.. code:: python
144+
145+
import pandas as pd
146+
from windpowerlib import WindTurbine, create_power_curve
147+
my_data = pd.read_csv("path/to/my/data/file.csv")
148+
149+
my_turbine_data = {
150+
"nominal_power": 6e6, # in W
151+
"hub_height": 115, # in m
152+
"power_curve": create_power_curve(
153+
wind_speed=my_data["wind"], power=my_data["power"]
154+
),
155+
}
156+
157+
my_turbine = WindTurbine(**my_turbine2)
158+
159+
See the `modelchain_example` for more information.
160+
103161
Contributing
104162
==============
105163

0 commit comments

Comments
 (0)