AEP from rose after optimizing with serial refine #433
-
Hello all, In the aep from rose example, I have seen that after calculating FLORIS for every WD and WS and returning the farm power: farm_power_array = fi.get_farm_power() Then FLORIS solutions are mapped to the wind rose dataframe: wd_grid, ws_grid = np.meshgrid(wd_array, ws_array, indexing='ij') I am trying to calculate aep after yaw optimization with serial refine, to compare it with the baseline: df_opt_AEP = yaw_opt_AEP.optimize() However, I am not able to map the FLORIS solutions after optimization to the wind rose dataframe: wd_grid, ws_grid = np.meshgrid(wd_array, ws_array, indexing='ij') It complains about df_opt_AEP.farm_power_opt.flatten() saying 'Series' object has no attribute 'flatten'. Could you please advice how to calculate aep from rose after yaw optimization? Many thanks! Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @Ana-GS, You must note that The end product of the yaw optimization will return
To put the optimal yaw angles from
This interpolant will return the optimal yaw angles for any wind direction and wind speed you insert. So, if
where Does this answer your question? |
Beta Was this translation helpful? Give feedback.
-
Dear Floris team, Using the example: floris/examples/10_optimize_yaw.py I have calculated the AEP for my wind farm both baseline and after yaw optimization. However, I would like to calculate AEP after yaw optimization, optimizing not only for one wind speed which is then applied to a range of speeds, but optimizing for all wind speeds at steps of 1m/s. Then applying the yaw offsets for each wind speed to calculate the AEP gain. Do you have an example that does this you could share? Many thanks! Best regards, Ana |
Beta Was this translation helpful? Give feedback.
Hi @Ana-GS,
You must note that
farm_power_array
is a two-dimensional matrix with shape(n_wind_directions, n_wind_speeds)
. That is what we call the "gridded" format and the conventional variable format inside FLORIS. You can turn this into a one-dimensional array usingfarm_power_array.flatten()
, which has shape(n_wind_directions * n_wind_speeds, 1)
. This is what you can call the "flattened" format.The end product of the yaw optimization will return
df_opt
, which is a dataframe which is already in flattened format. For example: