Skip to content

Commit 393d896

Browse files
Birgit SchachlerBirgit Schachler
authored andcommitted
Minor changes in notebook
1 parent 4679f15 commit 393d896

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

example/basic_example.ipynb

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,26 @@
147147
"cell_type": "markdown",
148148
"metadata": {},
149149
"source": [
150-
"To initialise your specific turbine you need a dictionary that contains your basic parameters. A turbine is defined by its nominal power, hub height, rotor diameter, and power or power coefficient curve.\n",
150+
"To initialise 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",
151151
"\n",
152-
"There are two ways to initialise 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'.\n",
152+
"There are two ways to initialise 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'.\n",
153153
"\n",
154154
"You can execute the following to get a list of all wind turbines for which power or power coefficient curves are provided."
155155
]
156156
},
157157
{
158158
"cell_type": "code",
159159
"execution_count": null,
160-
"metadata": {},
160+
"metadata": {
161+
"collapsed": true
162+
},
161163
"outputs": [],
162164
"source": [
165+
"# get power curves\n",
163166
"# print names of wind turbines for which power curves are provided (default)\n",
164167
"wt.get_turbine_types()\n",
165168
"\n",
169+
"# get power coefficient curves\n",
166170
"# write names of wind turbines for which power coefficient curves are provided to 'turbines' DataFrame\n",
167171
"turbines = wt.get_turbine_types(filename='cp_curves.csv', print_out=False)\n",
168172
"# find all Vestas in 'turbines' DataFrame\n",
@@ -186,19 +190,28 @@
186190
" 'p_values': pd.DataFrame(\n",
187191
" data={'p': [p * 1000 for p in [0.0, 26.0, 180.0, 1500.0, 3000.0, 3000.0]]}, # in W\n",
188192
" index=[0.0, 3.0, 5.0, 10.0, 15.0, 25.0])\n",
189-
" }\n",
190-
"\n",
193+
" } \n",
194+
"# initialise WindTurbine objects\n",
195+
"my_turbine = wt.WindTurbine(**myTurbine)"
196+
]
197+
},
198+
{
199+
"cell_type": "code",
200+
"execution_count": null,
201+
"metadata": {
202+
"collapsed": true
203+
},
204+
"outputs": [],
205+
"source": [
191206
"# specification of wind turbine where power curve is provided\n",
192-
"# if you want to use the power coefficient curve add {}'fetch_curve': 'cp'} to the dictionary\n",
207+
"# if you want to use the power coefficient curve add {'fetch_curve': 'cp'} to the dictionary\n",
193208
"enerconE126 = {\n",
194209
" 'turbine_name': 'ENERCON E 126 7500', # Turbine name as in register\n",
195210
" 'hub_height': 135, # in m\n",
196211
" 'd_rotor': 127 # in m\n",
197212
" }\n",
198-
" \n",
199213
"# initialise WindTurbine objects\n",
200-
"e126 = wt.WindTurbine(**enerconE126)\n",
201-
"my_turbine = wt.WindTurbine(**myTurbine)"
214+
"e126 = wt.WindTurbine(**enerconE126)"
202215
]
203216
},
204217
{
@@ -213,9 +226,12 @@
213226
{
214227
"cell_type": "code",
215228
"execution_count": null,
216-
"metadata": {},
229+
"metadata": {
230+
"collapsed": true
231+
},
217232
"outputs": [],
218233
"source": [
234+
"# power output calculation for my_turbine\n",
219235
"# initialise ModelChain with default parameters and use run_model method to calculate power output\n",
220236
"mc_my_turbine = modelchain.ModelChain(my_turbine).run_model(\n",
221237
" weather, data_height)\n",
@@ -226,9 +242,12 @@
226242
{
227243
"cell_type": "code",
228244
"execution_count": null,
229-
"metadata": {},
245+
"metadata": {
246+
"collapsed": true
247+
},
230248
"outputs": [],
231249
"source": [
250+
"# power output calculation for e126\n",
232251
"# own specifications for ModelChain setup\n",
233252
"modelchain_data = {\n",
234253
" 'obstacle_height': 0, # default: 0\n",
@@ -272,7 +291,9 @@
272291
{
273292
"cell_type": "code",
274293
"execution_count": null,
275-
"metadata": {},
294+
"metadata": {
295+
"collapsed": true
296+
},
276297
"outputs": [],
277298
"source": [
278299
"# plot turbine power output\n",

0 commit comments

Comments
 (0)