Skip to content

Commit 1af750b

Browse files
committed
Adapt examples to show initialization of wind farm with total capacity
1 parent 6050665 commit 1af750b

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

example/turbine_cluster_modelchain_example.ipynb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"source": [
8484
"### Initialize wind farm\n",
8585
"\n",
86-
"To initialize a specific wind farm you need to provide a wind turbine fleet and optionally a wind farm efficiency and a name as an identifier."
86+
"To initialize a specific wind farm you need to provide a wind turbine fleet specifying the wind turbines and their number or total installed capacity (in Watt) in the farm. Optionally, you can specify a wind farm efficiency and a name as an identifier."
8787
]
8888
},
8989
{
@@ -95,10 +95,12 @@
9595
"# specification of wind farm\n",
9696
"example_farm_data = {\n",
9797
" 'name': 'example_farm',\n",
98-
" 'wind_turbine_fleet': [{'wind_turbine': my_turbine,\n",
99-
" 'number_of_turbines': 6},\n",
98+
" 'wind_turbine_fleet': [{'wind_turbine': my_turbine, # as windpowerlib.WindTurbine\n",
99+
" 'number_of_turbines': 6}, # number of `my_turbine` turbines in farm (float \n",
100+
" # values are possible as well)\n",
100101
" {'wind_turbine': e126,\n",
101-
" 'number_of_turbines': 3}\n",
102+
" 'total_capacity': 12.6e6} # installed capacity of `my_turbine` turbines \n",
103+
" # in farm in Watt\n",
102104
" ]}\n",
103105
"\n",
104106
"# initialize WindFarm object\n",
@@ -339,7 +341,7 @@
339341
"name": "python",
340342
"nbconvert_exporter": "python",
341343
"pygments_lexer": "ipython3",
342-
"version": "3.6.6"
344+
"version": "3.6.7"
343345
}
344346
},
345347
"nbformat": 4,

example/turbine_cluster_modelchain_example.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ def initialize_wind_farms(my_turbine, e126):
3333
Initializes two :class:`~.wind_farm.WindFarm` objects.
3434
3535
This function shows how to initialize a WindFarm object. A WindFarm needs
36-
a wind turbine fleet. Optionally, you can provide a wind farm efficiency
37-
(which can be constant or dependent on the wind speed) and a name as an
38-
identifier. See :class:`~.wind_farm.WindFarm` for more information.
36+
a wind turbine fleet specifying the wind turbines and their number or
37+
total installed capacity (in Watt) in the farm. Optionally, you can provide
38+
a wind farm efficiency (which can be constant or dependent on the wind
39+
speed) and a name as an identifier. See :class:`~.wind_farm.WindFarm` for
40+
more information.
3941
4042
Parameters
4143
----------
@@ -54,11 +56,15 @@ def initialize_wind_farms(my_turbine, e126):
5456
# specification of wind farm data
5557
example_farm_data = {
5658
'name': 'example_farm',
57-
'wind_turbine_fleet': [{'wind_turbine': my_turbine,
58-
'number_of_turbines': 6},
59-
{'wind_turbine': e126,
60-
'number_of_turbines': 3}
61-
]}
59+
'wind_turbine_fleet': [
60+
{'wind_turbine': my_turbine, # as windpowerlib.WindTurbine
61+
'number_of_turbines': 6}, # number of `my_turbine` turbines in
62+
# farm (float values are possible as
63+
# well)
64+
{'wind_turbine': e126,
65+
'total_capacity': 12.6e6 # installed capacity of `my_turbine`
66+
# turbines in farm in Watt
67+
}]}
6268
# initialize WindFarm object
6369
example_farm = WindFarm(**example_farm_data)
6470

0 commit comments

Comments
 (0)