flasc.analysis.expected_power_analysis.total_uplift_expected_power_sweep_ws_min

flasc.analysis.expected_power_analysis.total_uplift_expected_power_sweep_ws_min#

flasc.analysis.expected_power_analysis.total_uplift_expected_power_sweep_ws_min(a_in: AnalysisInput, uplift_pairs: List[Tuple[str, str]], uplift_names: List[str], test_turbines: List[int], wd_turbines: List[int] | None = None, ws_turbines: List[int] | None = None, use_predefined_wd: bool = False, use_predefined_ws: bool = False, wd_step: float = 2.0, wd_min: float = 0.0, wd_max: float = 360.0, ws_step: float = 1.0, ws_min: float = 0.0, ws_max: float = 50.0, bin_cols_in: List[str] = ['wd_bin', 'ws_bin'], weight_by: str = 'min', df_freq: DataFrame | None = None, use_standard_error: bool = True, N: int = 1, percentiles: List[float] = [2.5, 97.5], remove_any_null_turbine_bins: bool = False, cov_terms: str = 'zero', n_step: int = 10)[source]#

Perform a sweep over the ws_min parameter.

Perform a sweep over the ws_min parameter between the specified ws_min and ws_min + ws_step to determine the sensitivity of the total uplift to ws_min. Prints the total uplift for each ws_min considered.

Parameters:
  • a_in (AnalysisInput) -- An AnalysisInput object containing the dataframes to analyze.

  • uplift_pairs (List[Tuple[str, str]]) -- A list of tuples containing the df_name values to compare.

  • uplift_names (List[str]) -- A list of names for the uplift results for each uplift pair.

  • test_turbines (List[int]) -- A list of turbine indices to include when computing total uplift.

  • wd_turbines (List[int]) -- A list of turbine indices for determining the reference wind direction. Defaults to None.

  • ws_turbines (List[int]) -- A list of turbine indices for determining the reference wind speed. Defaults to None.

  • use_predefined_wd (bool) -- Use predefined wind direction. Defaults to False.

  • use_predefined_ws (bool) -- Use predefined wind speed. Defaults to False.

  • wd_step (float) -- The step size for the wind direction bins. Defaults to 2.0.

  • wd_min (float) -- The minimum wind direction value. Defaults to 0.0.

  • wd_max (float) -- The maximum wind direction value. Defaults to 360.0.

  • ws_step (float) -- The step size for the wind speed bins. Defaults to 1.0.

  • ws_min (float) -- The minimum wind speed value. Defaults to 0.0.

  • ws_max (float) -- The maximum wind speed value. Defaults to 50.0.

  • bin_cols_in (List[str]) -- A list of column names to bin the dataframes by. Defaults to ["wd_bin", "ws_bin"].

  • weight_by (str) -- The method used to weight the bins when computing total energy if df_freq is None ("min" or "sum"). If "min", the minimum number of points in a bin over all dataframes is used. If, "sum", the sum of the points over all dataframes is used. Defaults to "min".

  • df_freq (pd.DataFrame) -- A pandas dataframe with the frequency of each bin. Defaults to None.

  • use_standard_error (bool) -- If True, uncertainty in the total uplift is quantified by propagating bin-level standard errors. If False, bootstrapping is used. Defaults to True.

  • N (int) -- The number of bootstrap samples. If use_standard_error is True, N must be 1. Defaults to 1.

  • percentiles (List[float]) -- The lower and upper percentiles for quantifying uncertainty in total uplift. Defaults to [2.5, 97.5].

  • remove_any_null_turbine_bins (bool) -- If True, when computing farm power, remove any bins where any of the test turbines is null. Defaults to False.

  • cov_terms (str) -- If use_standard_error is True, the approach for determining the power covariance terms betweens pairs of test turbines whe computing uncertainty. Can be "zero", "var" or "cov". If "zero" all covariance terms are set to zero. If "var" all covariance terms are set to the product of the square root of the variances of each individual turbine. If "cov" the computed covariance terms are used as is when enough data are present in a bin, with missing terms set to the product of the square root of the individual turbine variances. Defaults to "zero".

  • n_step (int) -- The number of steps to perform the minimum wind speed sweep over. Defaults to 10.

Returns:

None