|
9 | 9 | "This example shows you the basic usage of the windpowerlib. \n", |
10 | 10 | "There are mainly three steps. First you have to import your weather data, then you need to specify your wind turbine, and in the last step call the windpowerlib functions to calculate the feedin timeseries.\n", |
11 | 11 | "\n", |
12 | | - "But first of all you need to import the packages needed for the different steps." |
| 12 | + "Before you start you have to import the packages needed for these steps." |
| 13 | + ] |
| 14 | + }, |
| 15 | + { |
| 16 | + "cell_type": "markdown", |
| 17 | + "metadata": {}, |
| 18 | + "source": [ |
| 19 | + "### Import necessary packages and modules" |
13 | 20 | ] |
14 | 21 | }, |
15 | 22 | { |
|
163 | 170 | "wt.get_turbine_types(print_out=False)\n", |
164 | 171 | "\n", |
165 | 172 | "# get power coefficient curves\n", |
166 | | - "# write names of wind turbines for which power coefficient curves are provided to 'turbines' DataFrame\n", |
| 173 | + "# write names of wind turbines for which power coefficient curves are provided\n", |
| 174 | + "# to 'turbines' DataFrame\n", |
167 | 175 | "turbines = wt.get_turbine_types(filename='cp_curves.csv', print_out=False)\n", |
168 | | - "# find all Vestas in 'turbines' DataFrame\n", |
| 176 | + "# find all Enercons in 'turbines' DataFrame\n", |
169 | 177 | "print(turbines[turbines[\"turbine_id\"].str.contains(\"ENERCON\")])" |
170 | 178 | ] |
171 | 179 | }, |
|
177 | 185 | }, |
178 | 186 | "outputs": [], |
179 | 187 | "source": [ |
180 | | - "# specification of own wind turbine (Note: power coefficient values and nominal power have to be in Watt)\n", |
| 188 | + "# specification of own wind turbine (Note: power coefficient values and\n", |
| 189 | + "# nominal power have to be in Watt)\n", |
181 | 190 | "myTurbine = {\n", |
182 | 191 | " 'turbine_name': 'myTurbine',\n", |
183 | 192 | " 'nominal_power': 3e6, # in W\n", |
184 | 193 | " 'hub_height': 105, # in m\n", |
185 | 194 | " 'd_rotor': 90, # in m\n", |
186 | 195 | " 'p_values': pd.DataFrame(\n", |
187 | | - " data={'p': [p * 1000 for p in [0.0, 26.0, 180.0, 1500.0, 3000.0, 3000.0]]}, # in W\n", |
| 196 | + " data={'p': [p * 1000 for p in\n", |
| 197 | + " [0.0, 26.0, 180.0, 1500.0, 3000.0, 3000.0]]}, # in W\n", |
188 | 198 | " index=[0.0, 3.0, 5.0, 10.0, 15.0, 25.0]) # in m/s\n", |
189 | 199 | " } \n", |
190 | 200 | "# initialise WindTurbine object\n", |
|
200 | 210 | "outputs": [], |
201 | 211 | "source": [ |
202 | 212 | "# specification of wind turbine where power curve is provided\n", |
203 | | - "# if you want to use the power coefficient curve add {'fetch_curve': 'cp'} to the dictionary\n", |
| 213 | + "# if you want to use the power coefficient curve add {'fetch_curve': 'cp'}\n", |
| 214 | + "# to the dictionary\n", |
204 | 215 | "enerconE126 = {\n", |
205 | 216 | " 'turbine_name': 'ENERCON E 126 7500', # turbine name as in register\n", |
206 | 217 | " 'hub_height': 135, # in m\n", |
|
226 | 237 | "outputs": [], |
227 | 238 | "source": [ |
228 | 239 | "# power output calculation for my_turbine\n", |
229 | | - "# initialise ModelChain with default parameters and use run_model method to calculate power output\n", |
| 240 | + "# initialise ModelChain with default parameters and use run_model\n", |
| 241 | + "# method to calculate power output\n", |
230 | 242 | "mc_my_turbine = modelchain.ModelChain(my_turbine).run_model(\n", |
231 | 243 | " weather, data_height)\n", |
232 | 244 | "# write power output timeseries to WindTurbine object\n", |
|
248 | 260 | " 'power_output_model': 'p_values', # 'p_values' (default) or 'cp_values'\n", |
249 | 261 | " 'density_corr': True, # False (default) or True\n", |
250 | 262 | " 'hellman_exp': None} # None (default) or None\n", |
251 | | - "# initialise ModelChain with own specifications and use run_model method to calculate power output\n", |
| 263 | + "# initialise ModelChain with own specifications and use run_model method to\n", |
| 264 | + "# calculate power output\n", |
252 | 265 | "mc_e126 = modelchain.ModelChain(e126, **modelchain_data).run_model(\n", |
253 | 266 | " weather, data_height)\n", |
254 | 267 | "# write power output timeseries to WindTurbine object\n", |
|
0 commit comments