Skip to content

Commit 74bc189

Browse files
Birgit SchachlerBirgit Schachler
authored andcommitted
Shorten code lines to 79 characters
1 parent cab495d commit 74bc189

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

example/basic_example.ipynb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@
165165
"wt.get_turbine_types()\n",
166166
"\n",
167167
"# get power coefficient curves\n",
168-
"# write names of wind turbines for which power coefficient curves are provided to 'turbines' DataFrame\n",
168+
"# write names of wind turbines for which power coefficient curves are provided\n",
169+
"# to 'turbines' DataFrame\n",
169170
"turbines = wt.get_turbine_types(filename='cp_curves.csv', print_out=False)\n",
170171
"# find all Vestas in 'turbines' DataFrame\n",
171172
"print(turbines[turbines[\"turbine_id\"].str.contains(\"ENERCON\")])"
@@ -179,14 +180,16 @@
179180
},
180181
"outputs": [],
181182
"source": [
182-
"# specification of own wind turbine (Note: power coefficient values and nominal power have to be in Watt)\n",
183+
"# specification of own wind turbine (Note: power coefficient values and\n",
184+
"# nominal power have to be in Watt)\n",
183185
"myTurbine = {\n",
184186
" 'turbine_name': 'myTurbine',\n",
185187
" 'nominal_power': 3e6, # in W\n",
186188
" 'hub_height': 105, # in m\n",
187189
" 'd_rotor': 90, # in m\n",
188190
" 'p_values': pd.DataFrame(\n",
189-
" data={'p': [p * 1000 for p in [0.0, 26.0, 180.0, 1500.0, 3000.0, 3000.0]]}, # in W\n",
191+
" data={'p': [p * 1000 for p in\n",
192+
" [0.0, 26.0, 180.0, 1500.0, 3000.0, 3000.0]]}, # in W\n",
190193
" index=[0.0, 3.0, 5.0, 10.0, 15.0, 25.0]) # in m/s\n",
191194
" } \n",
192195
"# initialise WindTurbine object\n",
@@ -202,7 +205,8 @@
202205
"outputs": [],
203206
"source": [
204207
"# specification of wind turbine where power curve is provided\n",
205-
"# if you want to use the power coefficient curve add {'fetch_curve': 'cp'} to the dictionary\n",
208+
"# if you want to use the power coefficient curve add {'fetch_curve': 'cp'}\n",
209+
"# to the dictionary\n",
206210
"enerconE126 = {\n",
207211
" 'turbine_name': 'ENERCON E 126 7500', # turbine name as in register\n",
208212
" 'hub_height': 135, # in m\n",
@@ -228,7 +232,8 @@
228232
"outputs": [],
229233
"source": [
230234
"# power output calculation for my_turbine\n",
231-
"# initialise ModelChain with default parameters and use run_model method to calculate power output\n",
235+
"# initialise ModelChain with default parameters and use run_model\n",
236+
"# method to calculate power output\n",
232237
"mc_my_turbine = modelchain.ModelChain(my_turbine).run_model(\n",
233238
" weather, data_height)\n",
234239
"# write power output timeseries to WindTurbine object\n",
@@ -250,7 +255,8 @@
250255
" 'power_output_model': 'p_values', # 'p_values' (default) or 'cp_values'\n",
251256
" 'density_corr': True, # False (default) or True\n",
252257
" 'hellman_exp': None} # None (default) or None\n",
253-
"# initialise ModelChain with own specifications and use run_model method to calculate power output\n",
258+
"# initialise ModelChain with own specifications and use run_model method to\n",
259+
"# calculate power output\n",
254260
"mc_e126 = modelchain.ModelChain(e126, **modelchain_data).run_model(\n",
255261
" weather, data_height)\n",
256262
"# write power output timeseries to WindTurbine object\n",

0 commit comments

Comments
 (0)