Skip to content

Commit f521972

Browse files
committed
Adapt notebook and comments/docstrings to commit 2cd4e78
1 parent 5528529 commit f521972

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

doc/modelchain_example_notebook.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"source": [
153153
"To initialize a specific turbine you need a dictionary that contains the basic parameters. A turbine is defined by its nominal power, hub height, rotor diameter, and power or power coefficient curve.\n",
154154
"\n",
155-
"There are three ways to initialize a WindTurbine object in the windpowerlib. You can either specify your own turbine, as done below for 'myTurbine', or fetch power and/or power coefficient curve data from data files provided by the windpowerlib, as done for the 'enerconE126', or provide your turbine data in csv files as done for the 'example_turbine' with an example file.\n",
155+
"There are three ways to initialize a WindTurbine object in the windpowerlib. You can either specify your own turbine, as done below for 'my_turbine', or fetch power and/or power coefficient curve data from data files provided by the windpowerlib, as done for the 'enercon_e126', or provide your turbine data in csv files as done for the 'dummy_turbine' with an example file.\n",
156156
"\n",
157157
"You can execute the following to get a table of all wind turbines for which power and/or power coefficient curves are provided."
158158
]
@@ -230,7 +230,7 @@
230230
"source": [
231231
"# specification of own wind turbine (Note: power coefficient values and\n",
232232
"# nominal power have to be in Watt)\n",
233-
"myTurbine = {\n",
233+
"my_turbine = {\n",
234234
" 'name': 'myTurbine',\n",
235235
" 'nominal_power': 3e6, # in W\n",
236236
" 'hub_height': 105, # in m\n",
@@ -241,7 +241,7 @@
241241
" 'wind_speed': [0.0, 3.0, 5.0, 10.0, 15.0, 25.0]}) # in m/s\n",
242242
" } \n",
243243
"# initialisze WindTurbine object\n",
244-
"my_turbine = WindTurbine(**myTurbine)"
244+
"my_turbine = WindTurbine(**my_turbine)"
245245
]
246246
},
247247
{
@@ -265,15 +265,15 @@
265265
"# specification of wind turbine where power curve is provided\n",
266266
"# if you want to use the power coefficient curve change the value of\n",
267267
"# 'fetch_curve' to 'power_coefficient_curve'\n",
268-
"enerconE126 = {\n",
268+
"enercon_e126 = {\n",
269269
" 'name': 'E-126/4200', # turbine type as in register #\n",
270270
" 'hub_height': 135, # in m\n",
271271
" 'rotor_diameter': 127, # in m\n",
272272
" 'fetch_curve': 'power_curve', # fetch power curve #\n",
273273
" 'data_source': 'oedb' # data source oedb or name of csv file\n",
274274
" }\n",
275275
"# initialize WindTurbine object\n",
276-
"e126 = WindTurbine(**enerconE126)"
276+
"e126 = WindTurbine(**enercon_e126)"
277277
]
278278
},
279279
{
@@ -284,15 +284,15 @@
284284
"source": [
285285
"# specification of wind turbine where power coefficient curve is provided\n",
286286
"# by a csv file\n",
287-
"dummyTurbine = {\n",
287+
"dummy_turbine = {\n",
288288
" 'name': 'DUMMY 1', # turbine type as in file #\n",
289289
" 'hub_height': 100, # in m\n",
290290
" 'rotor_diameter': 70, # in m\n",
291291
" 'fetch_curve': 'power_coefficient_curve', # fetch cp curve #\n",
292292
" 'data_source': 'example_power_coefficient_curves.csv' # data source\n",
293293
"}\n",
294294
"# initialize WindTurbine object\n",
295-
"dummy_turbine = WindTurbine(**dummyTurbine)"
295+
"dummy_turbine = WindTurbine(**dummy_turbine)"
296296
]
297297
},
298298
{

example/modelchain_example.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"source": [
153153
"To initialize a specific turbine you need a dictionary that contains the basic parameters. A turbine is defined by its nominal power, hub height, rotor diameter, and power or power coefficient curve.\n",
154154
"\n",
155-
"There are three ways to initialize a WindTurbine object in the windpowerlib. You can either specify your own turbine, as done below for 'myTurbine', or fetch power and/or power coefficient curve data from data files provided by the windpowerlib, as done for the 'enerconE126', or provide your turbine data in csv files as done for the 'example_turbine' with an example file.\n",
155+
"There are three ways to initialize a WindTurbine object in the windpowerlib. You can either specify your own turbine, as done below for 'my_turbine', or fetch power and/or power coefficient curve data from data files provided by the windpowerlib, as done for the 'enercon_e126', or provide your turbine data in csv files as done for the 'dummy_turbine' with an example file.\n",
156156
"\n",
157157
"You can execute the following to get a table of all wind turbines for which power and/or power coefficient curves are provided."
158158
]
@@ -230,7 +230,7 @@
230230
"source": [
231231
"# specification of own wind turbine (Note: power coefficient values and\n",
232232
"# nominal power have to be in Watt)\n",
233-
"myTurbine = {\n",
233+
"my_turbine = {\n",
234234
" 'name': 'myTurbine',\n",
235235
" 'nominal_power': 3e6, # in W\n",
236236
" 'hub_height': 105, # in m\n",
@@ -241,7 +241,7 @@
241241
" 'wind_speed': [0.0, 3.0, 5.0, 10.0, 15.0, 25.0]}) # in m/s\n",
242242
" } \n",
243243
"# initialisze WindTurbine object\n",
244-
"my_turbine = WindTurbine(**myTurbine)"
244+
"my_turbine = WindTurbine(**my_turbine)"
245245
]
246246
},
247247
{
@@ -265,15 +265,15 @@
265265
"# specification of wind turbine where power curve is provided\n",
266266
"# if you want to use the power coefficient curve change the value of\n",
267267
"# 'fetch_curve' to 'power_coefficient_curve'\n",
268-
"enerconE126 = {\n",
268+
"enercon_e126 = {\n",
269269
" 'name': 'E-126/4200', # turbine type as in register #\n",
270270
" 'hub_height': 135, # in m\n",
271271
" 'rotor_diameter': 127, # in m\n",
272272
" 'fetch_curve': 'power_curve', # fetch power curve #\n",
273273
" 'data_source': 'oedb' # data source oedb or name of csv file\n",
274274
" }\n",
275275
"# initialize WindTurbine object\n",
276-
"e126 = WindTurbine(**enerconE126)"
276+
"e126 = WindTurbine(**enercon_e126)"
277277
]
278278
},
279279
{
@@ -284,15 +284,15 @@
284284
"source": [
285285
"# specification of wind turbine where power coefficient curve is provided\n",
286286
"# by a csv file\n",
287-
"dummyTurbine = {\n",
287+
"dummy_turbine = {\n",
288288
" 'name': 'DUMMY 1', # turbine type as in file #\n",
289289
" 'hub_height': 100, # in m\n",
290290
" 'rotor_diameter': 70, # in m\n",
291291
" 'fetch_curve': 'power_coefficient_curve', # fetch cp curve #\n",
292292
" 'data_source': 'example_power_coefficient_curves.csv' # data source\n",
293293
"}\n",
294294
"# initialize WindTurbine object\n",
295-
"dummy_turbine = WindTurbine(**dummyTurbine)"
295+
"dummy_turbine = WindTurbine(**dummy_turbine)"
296296
]
297297
},
298298
{

example/modelchain_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ def initialize_wind_turbines():
8585
Initializes two :class:`~.wind_turbine.WindTurbine` objects.
8686
8787
Function shows three ways to initialize a WindTurbine object. You can
88-
either specify your own turbine, as done below for 'myTurbine', or fetch
88+
either specify your own turbine, as done below for 'my_turbine', or fetch
8989
power and/or power coefficient curve data from the Open Energy Database
90-
(oedb), as done for the 'enerconE126', or provide your turbine data in csv
91-
files as done for 'dummyTurbine' with an example file.
90+
(oedb), as done for the 'enercon_e126', or provide your turbine data in csv
91+
files as done for 'dummy_turbine' with an example file.
9292
Execute ``windpowerlib.wind_turbine.get_turbine_types()`` to get a table
9393
including all wind turbines for which power and/or power coefficient curves
9494
are provided.
9595
9696
Returns
9797
-------
98-
Tuple (WindTurbine, WindTurbine)
98+
Tuple (WindTurbine, WindTurbine, WindTurbine)
9999
100100
"""
101101

0 commit comments

Comments
 (0)