flasc.utilities.floris_tools#
Utility functions that use FlorisModels.
Functions
Add Gaussian blending to the precalculated FLORIS solutions. |
|
Calculate the FLORIS approximate table from a FlorisModel object. |
|
Get all dependent turbines for each turbine in the farm. |
|
Get all impacting turbines for each turbine in the farm. |
|
Get all impacting turbines using a simple geometric model. |
|
Get dependent turbines for a test turbine for each wind direction. |
|
Find turbines within a certain radius of a turbine. |
|
Use FLORIS to determine which turbines are operating in freestream flow. |
|
Interpolate FLORIS predictions from a precalculated table of solutions. |
- flasc.utilities.floris_tools.interpolate_floris_from_df_approx(df, df_approx, method='linear', wrap_0deg_to_360deg=True, extrapolate_ws=True, extrapolate_ti=True, mirror_nans=True, verbose=True)[source]#
Interpolate FLORIS predictions from a precalculated table of solutions.
This function generates the FLORIS predictions for a set of historical data, 'df', quickly by linearly interpolating from a precalculated set of FLORIS solutions, 'df_approx'. We use linear interpolation to eliminate dependency of the computation time on the size of the dataframe/number of timeseries samples.
- Parameters:
df (pd.DataFrame | FlascDataFrame) -- A Pandas DataFrame
for (containing the timeseries)
contain (which the FLORIS predictions should be calculated. It should)
'wd' (at least the columns)
'ws'
'ti' (and)
the (which are respectively)
direction (ambient wind)
speed (ambient wind)
turbulence (and ambient)
example (intensity to be used in the FLORIS predictions. An)
df= -- time wd ws ti
00 (1 2018-01-01) -- 10:00 213.1 7.81 0.08
00 -- 20:00 215.6 7.65 0.08
... (... ... ... ...)
23 (52104 2018-12-31) -- 30:00 15.6 11.0 0.08
23 -- 40:00 15.3 11.1 0.08
df_approx (pd.DataFrame) -- A Pandas DataFrame containing the precalculated
directions (solutions of the FLORIS model for a large grid of ambient wind)
:param : :param wind speeds and turbulence intensities. This table is typically calculated: :param using the 'calc_floris_approx_table: :type using the 'calc_floris_approx_table: ... :param can also be generated by hand using other tools like PyWake. df_approx: :param typically has the form: :param df_approx=: wd ws ti pow_000 pow_001 ... pow_006 :param 0 0.0 1.0 0.03 0.0 0.0 ... 0.0: :param 1 3.0 1.0 0.03 0.0 0.0 ... 0.0: :param ... ... ... ... ... ... ... ...: :param 32399 357.0 24.0 0.18 5.0e6 5.0e6 ... 5.0e6: :param 32400 360.0 24.0 0.18 5.0e6 5.0e6 ... 5.0e6: :param method: Interpolation method, options are 'nearest' and :type method: str, optional :param 'linear'. Defaults to 'linear'.: :param wrap_0deg_to_360deg: The precalculated set of FLORIS solutions :type wrap_0deg_to_360deg: bool, optional :param are typically calculates from 0 deg to 360 deg in steps of 2.0 deg or 3.0 deg.: :param This means the last wind direction in the precalculated table of solutions is: :param at 357.0 deg or 358.0 deg. If the user uses this for interpolation: :param any wind: :param directions in 'df' with a value between 358.0 deg and 360.0 deg cannot be: :param interpolated because it falls outside the bounds. This option copies the: :param precalculated table solutions from 0 deg over to 360 deg to allow interpolation: :param for the entire wind rose. Recommended to set to True. Defaults to True.: :param extrapolate_ws: The precalculated set of FLORIS solutions, :type extrapolate_ws: bool, optional :param df_approx: :param only covers a finite range of wind speeds: :param typically from 1 m/s up: :param to 25 m/s. Any wind speed values below or above this range therefore cannot: :param be interpolated using the 'linear' method and therefore becomes a NaN. To: :param prevent this: :param we can copy over the lowest and highest wind speed value interpolated: :param to finite bounds to avoid this. For example: :param if our lowest wind speed calculated is: :param 1 m/s: :param we copy the solutions at 1 m/s over to a wind speed of 0 m/s: :param implicitly: :param assuming these values are equal. This allows interpolation over wind speeds below: :param 1 m/s. Additionally: :type 1 m/s. Additionally: e.g., 25 m/s :param we copy the highest wind speed solutions: :type we copy the highest wind speed solutions: e.g., 25 m/s :param to a wind speed of 99 m/s to allow interpolation of values up to 99 m/s.: :param Defaults to True.: :param extrapolate_ti: The precalculated set of FLORIS solutions, :type extrapolate_ti: bool, optional :param df_approx: :param only covers a finite range of turbulence intensities: :param typically from: :param 0.03 to 0.18: :param being respectively 3% and 18%. In the same fashion at: :param 'extrapolate_ws': :param we copy the lowest and highest turbulence intensity solutions: :param over to 0.00 and 1.00 turbulence intensity: :param to cover all possible conditions: :param we may find and to avoid any NaN interpolation. This implicitly makes the: :param assumption that the solutions at 0% TI are equal to your solutions at 3% TI: :param : :param and that your solutions at 100% TI are equal to your solutions at 18% TI.: :param This may or may not be a valid assumption for your scenario. Defaults to True.: :param mirror_nans: The raw data for which the FLORIS predictions are :type mirror_nans: bool, optional :param made may contain NaNs for specific turbines: :param e.g.: :param due to sensor issues or due: :param to irregular turbine behavior. By setting mirror_nans=True: :param the NaNs for turbines: :param from the raw data will be copied such that NaNs in the raw data will also mean: :param NaNs in the FLORIS predictions. Recommended to set this to True to ensure the: :param remainder of the energy ratio analysis is a fair and accurate comparison. Defaults: :param to True.: :param verbose: Print warnings and information to the console. :type verbose: bool, optional :param Defaults to True.:
- Returns:
The Pandas Dataframe containing the timeseries 'wd', 'ws' and 'ti', plus the power productions (and potentially local inflow conditions) of the turbines interpolated from the precalculated solutions table. For example,
- df=
time wd ws ti pow_000 pow_001 ... pow_006
0 2018-01-01 00:10:00 213.1 7.81 0.08 1251108.2 825108.2 ... 725108.9 1 2018-01-01 00:20:00 215.6 7.65 0.08 1202808.0 858161.8 ... 692111.2 ... ... ... ... ... ... ... ... ... 52103 2018-12-31 23:30:00 15.6 11.0 0.08 4235128.7 3825108.4 ... 2725108.3 52104 2018-12-31 23:40:00 15.3 11.1 0.08 3860281.3 3987634.7 ... 2957021.7
- Return type:
df (pd.DataFrame)
- flasc.utilities.floris_tools.calc_floris_approx_table(fm, wd_array=array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25., 26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38., 39., 40., 41., 42., 43., 44., 45., 46., 47., 48., 49., 50., 51., 52., 53., 54., 55., 56., 57., 58., 59., 60., 61., 62., 63., 64., 65., 66., 67., 68., 69., 70., 71., 72., 73., 74., 75., 76., 77., 78., 79., 80., 81., 82., 83., 84., 85., 86., 87., 88., 89., 90., 91., 92., 93., 94., 95., 96., 97., 98., 99., 100., 101., 102., 103., 104., 105., 106., 107., 108., 109., 110., 111., 112., 113., 114., 115., 116., 117., 118., 119., 120., 121., 122., 123., 124., 125., 126., 127., 128., 129., 130., 131., 132., 133., 134., 135., 136., 137., 138., 139., 140., 141., 142., 143., 144., 145., 146., 147., 148., 149., 150., 151., 152., 153., 154., 155., 156., 157., 158., 159., 160., 161., 162., 163., 164., 165., 166., 167., 168., 169., 170., 171., 172., 173., 174., 175., 176., 177., 178., 179., 180., 181., 182., 183., 184., 185., 186., 187., 188., 189., 190., 191., 192., 193., 194., 195., 196., 197., 198., 199., 200., 201., 202., 203., 204., 205., 206., 207., 208., 209., 210., 211., 212., 213., 214., 215., 216., 217., 218., 219., 220., 221., 222., 223., 224., 225., 226., 227., 228., 229., 230., 231., 232., 233., 234., 235., 236., 237., 238., 239., 240., 241., 242., 243., 244., 245., 246., 247., 248., 249., 250., 251., 252., 253., 254., 255., 256., 257., 258., 259., 260., 261., 262., 263., 264., 265., 266., 267., 268., 269., 270., 271., 272., 273., 274., 275., 276., 277., 278., 279., 280., 281., 282., 283., 284., 285., 286., 287., 288., 289., 290., 291., 292., 293., 294., 295., 296., 297., 298., 299., 300., 301., 302., 303., 304., 305., 306., 307., 308., 309., 310., 311., 312., 313., 314., 315., 316., 317., 318., 319., 320., 321., 322., 323., 324., 325., 326., 327., 328., 329., 330., 331., 332., 333., 334., 335., 336., 337., 338., 339., 340., 341., 342., 343., 344., 345., 346., 347., 348., 349., 350., 351., 352., 353., 354., 355., 356., 357., 358., 359.]), ws_array=array([1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.]), ti_array=array([0.03, 0.06, 0.09, 0.12, 0.15, 0.18]), save_turbine_inflow_conditions_to_df=False)[source]#
Calculate the FLORIS approximate table from a FlorisModel object.
This function calculates a large number of floris solutions for a rectangular grid of wind directions ('wd_array'), wind speeds ('ws_array'), and optionally turbulence intensities ('ti_array'). The variables that are saved are each turbine's power production, and optionally also each turbine's inflow wind direction, wind speed and turbulence intensity if 'save_turbine_inflow_conditions_to_df==True'.
- Parameters:
fm (FlorisModel) -- FlorisModel object.
wd_array (array, optional) -- Array of wind directions to evaluate in [deg]. This expands with the number of wind speeds and turbulence intensities. Defaults to np.arange(0.0, 360.0, 1.0).
ws_array (array, optional) -- Array of wind speeds to evaluate in [m/s]. This expands with the number of wind directions and turbulence intensities. Defaults to np.arange(1.0, 25.01, 1.0).
ti_array (array, optional) -- Array of turbulence intensities to evaluate in [-]. This expands with the number of wind directions and wind speeds. Defaults to np.arange(0.03, 0.1801, 0.03).
save_turbine_inflow_conditions_to_df (bool, optional) -- When set to True, will also write each turbine's
direction (inflow wind)
the (wind speed and turbulence intensity to the output dataframe. This increases)
False. (dataframe size but can provide useful information. Defaults to)
- Returns:
- A Pandas DataFrame containing the floris simulation results for all wind
direction, wind speed and turbulence intensity combinations. The outputs are the power production for each turbine, 'pow_000' until 'pow_{nturbs-1}', and optionally als each turbine's inflow wind direction, wind speed and turbulence intensity when save_turbine_inflow_conditions_to_df==True.
- Example for a 7-turbine floris object with
wd_array=np.arange(0.0, 360.0, 3.0) ws_array=np.arange(1.0, 25.001, 1.0) ti_array=np.arange(0.03, 0.1801, 0.03) save_turbine_inflow_conditions_to_df=True
- Return type:
pd.DataFrame
- Yields:
- df_approx=
wd ws ti pow_000 ws_000 wd_000 ti_000 pow_001 ... pow_006 ws_006 wd_006 ti_006
0 0.0 1.0 0.03 0.0 1.0 0.0 0.03 0.0 ... 0.0 1.0 0.0 0.03 1 3.0 1.0 0.03 0.0 1.0 3.0 0.03 0.0 ... 0.0 1.0 3.0 0.03 2 6.0 1.0 0.03 0.0 1.0 6.0 0.03 0.0 ... 0.0 1.0 6.0 0.03 3 9.0 1.0 0.03 0.0 1.0 9.0 0.03 0.0 ... 0.0 1.0 9.0 0.03 4 12.0 1.0 0.03 0.0 1.0 12.0 0.03 0.0 ... 0.0 1.0 12.0 0.03 ... ... ... ... ... ... ... ... ... ... ... ... ... 32395 345.0 25.0 0.18 0.0 24.880843 345.0 0.18 0.0 ... 0.0 24.881165 345.0 0.18 32396 348.0 25.0 0.18 0.0 24.880781 348.0 0.18 0.0 ... 0.0 24.881165 348.0 0.18 32397 351.0 25.0 0.18 0.0 24.880755 351.0 0.18 0.0 ... 0.0 24.881165 351.0 0.18 32398 354.0 25.0 0.18 0.0 24.880772 354.0 0.18 0.0 ... 0.0 24.881165 354.0 0.18 32399 357.0 25.0 0.18 0.0 24.880829 357.0 0.18 0.0 ... 0.0 24.881165 357.0 0.18 32400 360.0 25.0 0.18 0.0 24.880829 360.0 0.18 0.0 ... 0.0 24.881165 360.0 0.18
- flasc.utilities.floris_tools.add_gaussian_blending_to_floris_approx_table(df_fi_approx, wd_std=3.0, pdf_cutoff=0.995)[source]#
Add Gaussian blending to the precalculated FLORIS solutions.
This function applies a Gaussian blending across the wind direction for the predicted turbine power productions from FLORIS. This is a post-processing step and achieves the same result as evaluating FLORIS directly with the UncertainFlorisModel module. However, having this as a postprocess step allows for rapid generation of the FLORIS solutions for different values of wd_std without having to re-run FLORIS.
- Parameters:
df_fi_approx (pd.DataFrame) -- Pandas DataFrame with precalculated FLORIS solutions, typically generated using flasc.utilities.floris_tools.calc_floris_approx_table().
wd_std (float, optional) -- Standard deviation of the Gaussian blur that is applied across the wind direction in degrees. Defaults to 3.0.
pdf_cutoff (float, optional) -- Cut-off point of the probability density function of the Gaussian curve. Defaults to 0.995 and thereby includes three standard deviations to the left and to the right of the evaluation.
- Returns:
- Pandas DataFrame with Gaussian-blurred precalculated
FLORIS solutions. The DataFrame typically has the columns "wd", "ws", "ti", and "pow_000" until "pow_{nturbs-1}", with nturbs being the number of turbines.
- Return type:
pd.DataFrame
- flasc.utilities.floris_tools.get_turbs_in_radius(x_turbs, y_turbs, turb_no, max_radius, include_itself, sort_by_distance=False)[source]#
Find turbines within a certain radius of a turbine.
Determine which turbines are within a certain radius of other wind turbines.
- Parameters:
x_turbs ([list, array]) -- Long. locations of turbines
y_turbs ([list, array]) -- Lat. locations of turbines
turb_no (int) -- Turbine number for which the distance is
turbines. (calculated w.r.t. the other)
max_radius (float) -- Maximum distance between turbines to be
[turb_no]. (considered within the radius of turbine)
include_itself (bool) -- Include itself in the list of turbines
radius. (within the)
sort_by_distance (bool, optional) -- Sort the output list of turbines
turbine (according to distance to the)
(but (from closest to furthest)
False. (still within radius). Defaults to)
- Returns:
List of turbines that are within the prespecified distance from turbine [turb_no].
- Return type:
list
- flasc.utilities.floris_tools.get_all_impacting_turbines_geometrical(fm, turbine_weights, wd_array=array([0., 3., 6., 9., 12., 15., 18., 21., 24., 27., 30., 33., 36., 39., 42., 45., 48., 51., 54., 57., 60., 63., 66., 69., 72., 75., 78., 81., 84., 87., 90., 93., 96., 99., 102., 105., 108., 111., 114., 117., 120., 123., 126., 129., 132., 135., 138., 141., 144., 147., 150., 153., 156., 159., 162., 165., 168., 171., 174., 177., 180., 183., 186., 189., 192., 195., 198., 201., 204., 207., 210., 213., 216., 219., 222., 225., 228., 231., 234., 237., 240., 243., 246., 249., 252., 255., 258., 261., 264., 267., 270., 273., 276., 279., 282., 285., 288., 291., 294., 297., 300., 303., 306., 309., 312., 315., 318., 321., 324., 327., 330., 333., 336., 339., 342., 345., 348., 351., 354., 357.]), wake_slope=0.3)[source]#
Get all impacting turbines using a simple geometric model.
Determine which turbines affect the turbines of interest (i.e., those with a turbine_weights > 0.00001). This function uses very simplified geometric functions to very quickly derive which turbines are supposedly waking at least one turbine in the farm of interest.
- Parameters:
fm (FlorisModel) -- FLORIS object of the farm of interest.
turbine_weights (list) -- List of with turbine weights with length equal to the number of wind turbines, and typically filled with 0s (neighboring farms) and 1s (farm of interest).
wd_array (array, optional) -- Array of wind directions to evaluate in [deg].
wake_slope (float, optional) -- linear slope of the wake (dy/dx)
- Returns:
A Pandas Dataframe in which each row contains a wind direction and a list of turbine numbers. The turbine numbers are those turbines that should be modelled to accurately capture the wake losses for the wind farm of interest. Turbine numbers that are not in the 'impacting_turbines' can safely be removed from the simulation without affecting any of the turbines that have a nonzero turbine weight.
- Return type:
pd.Dataframe
- flasc.utilities.floris_tools.get_upstream_turbs_floris(fm, wd_step=0.1, wake_slope=0.1, plot_lines=False)[source]#
Use FLORIS to determine which turbines are operating in freestream flow.
Determine which turbines are operating in freestream (unwaked) flow, for the entire wind rose. This function will return a data- frame where each row will present a wind direction range and a set of wind turbine numbers for which those turbines are operating upstream. This is useful in determining the freestream conditions.
- Parameters:
fm ([FlorisModel) -- FLORIS object of the farm of interest.
wd_step (float, optional) -- Wind direction discretization step.
[wd_step] (It will test what the upstream turbines are every)
results (degrees. A lower number means more accurate)
but
so. (typically there's no real benefit below 2.0 deg or)
0.1. (Defaults to)
wake_slope (float, optional) -- linear slope of the wake (dy/dx)
plot_lines (bool, optional) -- Enable plotting wakes/turbines.
False. (Defaults to)
- Returns:
A Pandas Dataframe in which each row contains a wind direction range and a list of turbine numbers. For that particular wind direction range, the turbines numbered are all upstream according to the FLORIS predictions. Depending on the FLORIS model parameters and ambient conditions, these results may vary slightly. Though, having minimal wake losses should not noticably affect your outcomes. Empirically, this approach has yielded good results with real SCADA data for determining what turbines are waked/unwaked and has served useful for determining what turbines to use as reference.
- Return type:
df_upstream (pd.Dataframe)
- flasc.utilities.floris_tools.get_dependent_turbines_by_wd(fm_in, test_turbine, wd_array=array([0., 2., 4., 6., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44., 46., 48., 50., 52., 54., 56., 58., 60., 62., 64., 66., 68., 70., 72., 74., 76., 78., 80., 82., 84., 86., 88., 90., 92., 94., 96., 98., 100., 102., 104., 106., 108., 110., 112., 114., 116., 118., 120., 122., 124., 126., 128., 130., 132., 134., 136., 138., 140., 142., 144., 146., 148., 150., 152., 154., 156., 158., 160., 162., 164., 166., 168., 170., 172., 174., 176., 178., 180., 182., 184., 186., 188., 190., 192., 194., 196., 198., 200., 202., 204., 206., 208., 210., 212., 214., 216., 218., 220., 222., 224., 226., 228., 230., 232., 234., 236., 238., 240., 242., 244., 246., 248., 250., 252., 254., 256., 258., 260., 262., 264., 266., 268., 270., 272., 274., 276., 278., 280., 282., 284., 286., 288., 290., 292., 294., 296., 298., 300., 302., 304., 306., 308., 310., 312., 314., 316., 318., 320., 322., 324., 326., 328., 330., 332., 334., 336., 338., 340., 342., 344., 346., 348., 350., 352., 354., 356., 358.]), change_threshold=0.001, limit_number=None, ws_test=9.0, return_influence_magnitudes=False)[source]#
Get dependent turbines for a test turbine for each wind direction.
Computes all turbines that depend on the operation of a specified turbine (test_turbine) for each wind direction in wd_array, using the FLORIS model specified by fm_in to detect dependencies.
- Parameters:
fm_in (FlorisModels) -- FLORIS object of the farm of interest.
test_turbine (int) -- Turbine for which dependencies are found.
wd_array ([np.array]) -- Wind directions at which to determine dependencies. Defaults to [0, 2, ... , 358].
change_threshold (float) -- Fractional change in power needed to denote a dependency. Defaults to 0. (any change in power is marked as a dependency)
limit_number (int | NoneType) -- Number of turbines that a turbine can have as dependencies. If None, returns all turbines that depend on each turbine. Defaults to None.
ws_test (float) -- Wind speed at which FLORIS model is run to determine dependencies. Defaults to 9. m/s.
return_influence_magnitudes (Bool) -- Flag for whether to return an array containing the magnitude of the influence of the test_turbine on all turbines.
- Returns:
- dep_indices_by_wd (list): A 2-dimensional list. Each element of
the outer level list, which represents wind direction, contains a list of the turbines that depend on test_turbine for that wind direction. The second-level list may be empty if no turbine depends on the test_turbine for that wind direciton (e.g., the turbine is in the back row).
- all_influence_magnitudes ([np.array]): 2-D numpy array of
influences of test_turbine on all other turbines, with size (number of wind directions) x (number of turbines). Returned only if return_influence_magnitudes is True.
- Return type:
A tuple containing
- flasc.utilities.floris_tools.get_all_dependent_turbines(fm_in, wd_array=array([0., 2., 4., 6., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44., 46., 48., 50., 52., 54., 56., 58., 60., 62., 64., 66., 68., 70., 72., 74., 76., 78., 80., 82., 84., 86., 88., 90., 92., 94., 96., 98., 100., 102., 104., 106., 108., 110., 112., 114., 116., 118., 120., 122., 124., 126., 128., 130., 132., 134., 136., 138., 140., 142., 144., 146., 148., 150., 152., 154., 156., 158., 160., 162., 164., 166., 168., 170., 172., 174., 176., 178., 180., 182., 184., 186., 188., 190., 192., 194., 196., 198., 200., 202., 204., 206., 208., 210., 212., 214., 216., 218., 220., 222., 224., 226., 228., 230., 232., 234., 236., 238., 240., 242., 244., 246., 248., 250., 252., 254., 256., 258., 260., 262., 264., 266., 268., 270., 272., 274., 276., 278., 280., 282., 284., 286., 288., 290., 292., 294., 296., 298., 300., 302., 304., 306., 308., 310., 312., 314., 316., 318., 320., 322., 324., 326., 328., 330., 332., 334., 336., 338., 340., 342., 344., 346., 348., 350., 352., 354., 356., 358.]), change_threshold=0.001, limit_number=None, ws_test=9.0)[source]#
Get all dependent turbines for each turbine in the farm.
Wrapper for get_dependent_turbines_by_wd() that loops over all turbines in the farm and packages their dependencies as a pandas dataframe.
- Parameters:
fm_in (FlorisModel) -- FLORIS object of the farm of interest.
wd_array ([np.array]) -- Wind directions at which to determine dependencies. Defaults to [0, 2, ... , 358].
change_threshold (float) -- Fractional change in power needed to denote a dependency. Defaults to 0. (any change in power is marked as a dependency)
limit_number (int | NoneType) -- Number of turbines that a turbine can have as dependencies. If None, returns all turbines that depend on each turbine. Defaults to None.
ws_test (float) -- Wind speed at which FLORIS model is run to determine dependencies. Defaults to 9. m/s.
- Returns:
- A Pandas Dataframe in which each row
contains a wind direction, each column is a turbine, and each entry is the turbines that depend on the column turbine at the row wind direction. Dependencies can be extracted as: For wind direction wd, the turbines that depend on turbine T are df_out.loc[wd, T]. Dependencies are ordered, with strongest dependencies appearing first.
- Return type:
df_out (pd.Dataframe)
- flasc.utilities.floris_tools.get_all_impacting_turbines(fm_in, wd_array=array([0., 2., 4., 6., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44., 46., 48., 50., 52., 54., 56., 58., 60., 62., 64., 66., 68., 70., 72., 74., 76., 78., 80., 82., 84., 86., 88., 90., 92., 94., 96., 98., 100., 102., 104., 106., 108., 110., 112., 114., 116., 118., 120., 122., 124., 126., 128., 130., 132., 134., 136., 138., 140., 142., 144., 146., 148., 150., 152., 154., 156., 158., 160., 162., 164., 166., 168., 170., 172., 174., 176., 178., 180., 182., 184., 186., 188., 190., 192., 194., 196., 198., 200., 202., 204., 206., 208., 210., 212., 214., 216., 218., 220., 222., 224., 226., 228., 230., 232., 234., 236., 238., 240., 242., 244., 246., 248., 250., 252., 254., 256., 258., 260., 262., 264., 266., 268., 270., 272., 274., 276., 278., 280., 282., 284., 286., 288., 290., 292., 294., 296., 298., 300., 302., 304., 306., 308., 310., 312., 314., 316., 318., 320., 322., 324., 326., 328., 330., 332., 334., 336., 338., 340., 342., 344., 346., 348., 350., 352., 354., 356., 358.]), change_threshold=0.001, limit_number=None, ws_test=9.0)[source]#
Get all impacting turbines for each turbine in the farm.
Calculate which turbines impact a specified turbine based on the FLORIS model. Essentially a wrapper for get_dependent_turbines_by_wd() that loops over all turbines and extracts their impact magnitudes, then sorts.
- Parameters:
fm_in (FlorisModel) -- FLORIS object of the farm of interest.
wd_array ([np.array]) -- Wind directions at which to determine dependencies. Defaults to [0, 2, ... , 358].
change_threshold (float) -- Fractional change in power needed to denote a dependency. Defaults to 0. (any change in power is marked as a dependency)
limit_number (int | NoneType) -- Number of turbines that a turbine can depend on. If None, returns all turbines that each turbine depends on. Defaults to None.
ws_test (float) -- Wind speed at which FLORIS model is run to determine dependencies. Defaults to 9. m/s.
- Returns:
- A Pandas Dataframe in which each row
contains a wind direction, each column is a turbine, and each entry is the turbines that the column turbine depends on at the row wind direction. Dependencies can be extracted as: For wind direction wd, the turbines that impact turbine T are df_out.loc[wd, T]. Impacting turbines are simply ordered by magnitude of impact.
- Return type:
df_out (pd.Dataframe)