Skip to content

Commit 7cc5a8e

Browse files
committed
Add basic usage "how to define a turbine" to getting started
1 parent d712171 commit 7cc5a8e

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

doc/getting_started.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ You can also look at the examples in the :ref:`examples_section_label` section.
8787
Wind turbine data
8888
==================
8989

90+
The windpowerlib provides data of many wind turbines but it is also possible to
91+
use your own turbine data.
92+
93+
Use internal data
94+
~~~~~~~~~~~~~~~~~
95+
9096
The windpowerlib provides `wind turbine data <https://github.com/wind-python/windpowerlib/tree/master/windpowerlib/oedb>`_
9197
(power curves, hub heights, etc.) for a large set of wind turbines. See `Initialize wind turbine` in :ref:`examples_section_label` on how
9298
to use this data in your simulations.
@@ -99,9 +105,62 @@ To update your local files with the latest version of the `oedb turbine library
99105
from windpowerlib.wind_turbine import load_turbine_data_from_oedb
100106
load_turbine_data_from_oedb()
101107
108+
If you find your turbine in the database it is very easy to use it in the
109+
windpowerlib
110+
111+
.. code:: python
112+
113+
from windpowerlib import WindTurbine
114+
enercon_e126 = {
115+
"turbine_type": "E-126/4200", # turbine type as in register
116+
"hub_height": 135, # in m
117+
}
118+
e126 = WindTurbine(**enercon_e126)
119+
102120
We would like to encourage anyone to contribute to the turbine library by adding turbine data or reporting errors in the data.
103121
See `here <https://github.com/OpenEnergyPlatform/data-preprocessing/issues/28>`_ for more information on how to contribute.
104122

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

0 commit comments

Comments
 (0)