|
29 | 29 | "__copyright__ = \"Copyright oemof developer group\"\n", |
30 | 30 | "__license__ = \"GPLv3\"\n", |
31 | 31 | "\n", |
| 32 | + "import pandas as pd\n", |
| 33 | + "\n", |
32 | 34 | "import modelchain_example as mc_e\n", |
33 | 35 | "from windpowerlib import TurbineClusterModelChain, WindTurbineCluster, WindFarm\n", |
34 | 36 | "\n", |
|
92 | 94 | "metadata": {}, |
93 | 95 | "outputs": [], |
94 | 96 | "source": [ |
95 | | - "# specification of wind farm\n", |
96 | | - "example_farm_data = {\n", |
97 | | - " 'name': 'example_farm',\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", |
101 | | - " {'wind_turbine': e126,\n", |
102 | | - " 'total_capacity': 12.6e6} # installed capacity of `my_turbine` turbines \n", |
103 | | - " # in farm in Watt\n", |
104 | | - " ]}\n", |
105 | | - "\n", |
| 97 | + "# specification of wind farm data where turbine fleet is provided in a\n", |
| 98 | + "# pandas.DataFrame\n", |
| 99 | + "# for each turbine type you can either specify the number of turbines of\n", |
| 100 | + "# that type in the wind farm (float values are possible as well) or the\n", |
| 101 | + "# total installed capacity of that turbine type in W\n", |
| 102 | + "wind_turbine_fleet = pd.DataFrame(\n", |
| 103 | + " {'wind_turbine': [my_turbine, e126], # as windpowerlib.WindTurbine\n", |
| 104 | + " 'number_of_turbines': [6, None],\n", |
| 105 | + " 'total_capacity': [None, 12.6e6]}\n", |
| 106 | + " )\n", |
106 | 107 | "# initialize WindFarm object\n", |
107 | | - "example_farm = WindFarm(**example_farm_data)" |
| 108 | + "example_farm = WindFarm(name='example_farm',\n", |
| 109 | + " wind_turbine_fleet=wind_turbine_fleet)" |
108 | 110 | ] |
109 | 111 | }, |
110 | 112 | { |
|
128 | 130 | } |
129 | 131 | ], |
130 | 132 | "source": [ |
131 | | - "# specification of wind farm (2) with a wind farm efficiency\n", |
| 133 | + "# specification of wind farm data (2) containing a wind farm efficiency\n", |
| 134 | + "# wind turbine fleet is provided using the to_group function\n", |
132 | 135 | "example_farm_2_data = {\n", |
133 | 136 | " 'name': 'example_farm_2',\n", |
134 | | - " 'wind_turbine_fleet': [{'wind_turbine': my_turbine,\n", |
135 | | - " 'number_of_turbines': 6},\n", |
136 | | - " {'wind_turbine': e126,\n", |
137 | | - " 'number_of_turbines': 3}],\n", |
| 137 | + " 'wind_turbine_fleet': [my_turbine.to_group(6),\n", |
| 138 | + " e126.to_group(total_capacity=12.6e6)],\n", |
138 | 139 | " 'efficiency': 0.9}\n", |
139 | 140 | "\n", |
140 | 141 | "# initialize WindFarm object\n", |
|
176 | 177 | "\n", |
177 | 178 | "The TurbineClusterModelChain is a class that provides all necessary steps to calculate the power output of a wind farm or wind turbine cluster. \n", |
178 | 179 | "\n", |
179 | | - "Like the ModelChain (see [basic example](modelchain_example.ipynb)) you can use the TurbineClusterModelChain with default parameters as shown in this example for the wind farm or specify custom parameters as done here for the cluster.\n", |
| 180 | + "Like the ModelChain (see [basic example](modelchain_example_notebook.ipynb)) you can use the TurbineClusterModelChain with default parameters as shown in this example for the wind farm or specify custom parameters as done here for the cluster.\n", |
180 | 181 | "If you use the 'run_model' method first the aggregated power curve and the mean hub height of the wind farm/cluster is calculated, then inherited functions of the ModelChain are used to calculate the wind speed and density (if necessary) at hub height. After that, depending on the parameters, wake losses are applied and at last the power output is calculated." |
181 | 182 | ] |
182 | 183 | }, |
|
0 commit comments