floris.core.farm

Contents

floris.core.farm#

Functions

check_turbine_definition_for_v3_keys(...)

Check that the turbine definition does not contain any v3 keys.

Classes

Farm(layout_x, layout_y, turbine_type[, ...])

Farm is where wind power plants should be instantiated from a YAML configuration file.

class floris.core.farm.Farm(layout_x, layout_y, turbine_type, turbine_library_path=PosixPath('/home/runner/work/floris/floris/floris/turbine_library'))[source]#

Farm is where wind power plants should be instantiated from a YAML configuration file. The Farm will create a heterogeneous set of turbines that compose a wind farm, validate the inputs, and then create a vectorized representation of the the turbine data.

Farm is the container class of the FLORIS package. It brings together all of the component objects after input (i.e., Turbine, Wake, FlowField) and packages everything into the appropriate data type. Farm should also be used as an entry point to probe objects for generating output.

Args:
layout_x (NDArrayFloat): A sequence of x-axis locations for the turbines that can be

converted to a 1-D numpy.ndarray.

layout_y (NDArrayFloat): A sequence of y-axis locations for the turbines that can be

converted to a 1-D numpy.ndarray.

turbine_type (list[dict | str]): A list of turbine definition dictionaries, or string

references to the filename of the turbine type in either the FLORIS-provided turbine library (.../floris/turbine_library/), or a user-provided turbine_library_path.

turbine_library_path (str): Either an absolute file path to the turbine library, or a

path relative to the file that is running the analysis.

Parameters:
  • layout_x (Iterable)

  • layout_y (Iterable)

  • turbine_type (List)

  • turbine_library_path (str | Path)

layout_x: NDArrayFloat#
layout_y: NDArrayFloat#
turbine_type: List#
turbine_library_path: Path#
turbine_definitions: list#
turbine_thrust_coefficient_functions: Dict[str, Callable]#
turbine_axial_induction_functions: Dict[str, Callable]#
turbine_tilt_interps: dict[str, interp1d]#
yaw_angles: NDArrayFloat#
yaw_angles_sorted: NDArrayFloat#
tilt_angles: NDArrayFloat#
tilt_angles_sorted: NDArrayFloat#
power_setpoints: NDArrayFloat#
power_setpoints_sorted: NDArrayFloat#
awc_modes: NDArrayStr#
awc_modes_sorted: NDArrayStr#
awc_amplitudes: NDArrayFloat#
awc_amplitudes_sorted: NDArrayFloat#
awc_frequencies: NDArrayFloat#
awc_frequencies_sorted: NDArrayFloat#
hub_heights: NDArrayFloat#
hub_heights_sorted: NDArrayFloat#
turbine_map: List[Turbine]#
turbine_type_map: NDArrayObject#
turbine_type_map_sorted: NDArrayObject#
turbine_power_functions: Dict[str, Callable]#
turbine_power_thrust_tables: Dict[str, dict]#
rotor_diameters: NDArrayFloat#
rotor_diameters_sorted: NDArrayFloat#
TSRs: NDArrayFloat#
TSRs_sorted: NDArrayFloat#
ref_tilts: NDArrayFloat#
ref_tilts_sorted: NDArrayFloat#
correct_cp_ct_for_tilt: NDArrayFloat#
correct_cp_ct_for_tilt_sorted: NDArrayFloat#
internal_turbine_library: Path#
check_x(attribute, value)[source]#
Return type:

None

Parameters:
  • attribute (Attribute)

  • value (Any)

check_y(attribute, value)[source]#
Return type:

None

Parameters:
  • attribute (Attribute)

  • value (Any)

check_turbine_type(attribute, value)[source]#
Return type:

None

Parameters:
  • attribute (Attribute)

  • value (Any)

check_library_path(attribute, value)[source]#

Ensures that the input to library_path exists and is a directory.

Return type:

None

Parameters:
  • attribute (Attribute)

  • value (Path)

initialize(sorted_indices)[source]#
construct_hub_heights()[source]#
construct_rotor_diameters()[source]#
construct_turbine_TSRs()[source]#
construct_turbine_ref_tilts()[source]#
construct_turbine_correct_cp_ct_for_tilt()[source]#
construct_turbine_map()[source]#
construct_turbine_thrust_coefficient_functions()[source]#
construct_turbine_axial_induction_functions()[source]#
construct_turbine_tilt_interps()[source]#
construct_turbine_power_functions()[source]#
construct_turbine_power_thrust_tables()[source]#
expand_farm_properties(n_findex, sorted_coord_indices)[source]#
Parameters:

n_findex (int)

set_yaw_angles(yaw_angles)[source]#
Parameters:

yaw_angles (ndarray[Any, dtype[float64]] | list[float])

set_yaw_angles_to_ref_yaw(n_findex)[source]#
Parameters:

n_findex (int)

set_tilt_to_ref_tilt(n_findex)[source]#
Parameters:

n_findex (int)

set_power_setpoints(power_setpoints)[source]#
Parameters:

power_setpoints (ndarray[Any, dtype[float64]])

set_power_setpoints_to_ref_power(n_findex)[source]#
Parameters:

n_findex (int)

set_awc_modes(awc_modes)[source]#
Parameters:

awc_modes (ndarray[Any, dtype[str_]])

set_awc_modes_to_ref_mode(n_findex)[source]#
Parameters:

n_findex (int)

set_awc_amplitudes(awc_amplitudes)[source]#
Parameters:

awc_amplitudes (ndarray[Any, dtype[float64]])

set_awc_amplitudes_to_ref_amp(n_findex)[source]#
Parameters:

n_findex (int)

set_awc_frequencies(awc_frequencies)[source]#
Parameters:

awc_frequencies (ndarray[Any, dtype[float64]])

set_awc_frequencies_to_ref_freq(n_findex)[source]#
Parameters:

n_findex (int)

calculate_tilt_for_eff_velocities(rotor_effective_velocities)[source]#
finalize(unsorted_indices)[source]#
property coordinates#
property n_turbines#
floris.core.farm.check_turbine_definition_for_v3_keys(turbine_definition)[source]#

Check that the turbine definition does not contain any v3 keys.

Parameters:

turbine_definition (dict)