floris.core.turbine.turbine#
Functions
|
Axial induction factor of the turbine incorporating the thrust coefficient and yaw angle. |
|
Power produced by a turbine adjusted for yaw and tilt. |
|
Convert condition to the type expected by power_thrust_table and select nearest specified condition |
|
Thrust coefficient of a turbine. |
Classes
|
A class containing the parameters and infrastructure to model a wind turbine's performance for a particular atmospheric condition. |
- floris.core.turbine.turbine.select_multidim_condition(condition, specified_conditions)[source]#
Convert condition to the type expected by power_thrust_table and select nearest specified condition
- Return type:
tuple
- Parameters:
condition (dict | tuple)
specified_conditions (Iterable[tuple])
- floris.core.turbine.turbine.power(velocities, turbulence_intensities, air_density, power_functions, yaw_angles, tilt_angles, power_setpoints, awc_modes, awc_amplitudes, tilt_interps, turbine_type_map, turbine_power_thrust_tables, ix_filter=None, average_method='cubic-mean', cubature_weights=None, correct_cp_ct_for_tilt=False, multidim_condition=None)[source]#
Power produced by a turbine adjusted for yaw and tilt. Value given in Watts.
- Return type:
ndarray
[Any
,dtype
[float64
]]- Parameters:
velocities (ndarray[Any, dtype[float64]])
turbulence_intensities (ndarray[Any, dtype[float64]])
air_density (float)
power_functions (dict[str, Callable])
yaw_angles (ndarray[Any, dtype[float64]])
tilt_angles (ndarray[Any, dtype[float64]])
power_setpoints (ndarray[Any, dtype[float64]])
awc_modes (ndarray[Any, dtype[str_]])
awc_amplitudes (ndarray[Any, dtype[float64]])
tilt_interps (dict[str, interp1d])
turbine_type_map (ndarray[Any, dtype[object_]])
turbine_power_thrust_tables (dict)
ix_filter (ndarray[Any, dtype[int64]] | Iterable[int] | None)
average_method (str)
cubature_weights (ndarray[Any, dtype[float64]] | None)
correct_cp_ct_for_tilt (bool)
multidim_condition (tuple | None)
- Args:
- velocities (NDArrayFloat[n_findex, n_turbines, n_grid, n_grid]): The velocities at a
turbine.
- turbulence_intensities (NDArrayFloat[findex, turbines]): The turbulence intensity at
each turbine.
air_density (float): air density for simulation [kg/m^3] power_functions (dict[str, Callable]): A dictionary of power functions for
each turbine type. Keys are the turbine type and values are the callable functions.
yaw_angles (NDArrayFloat[findex, turbines]): The yaw angle for each turbine. tilt_angles (NDArrayFloat[findex, turbines]): The tilt angle for each turbine. power_setpoints: (NDArrayFloat[findex, turbines]): Maximum power setpoint for each
turbine [W].
- awc_modes: (NDArrayStr[findex, turbines]): awc excitation mode (currently, only "baseline"
and "helix" are implemented).
- awc_modes: (NDArrayStr[findex, turbines]): awc excitation mode (currently, only "baseline"
and "helix" are implemented).
- awc_amplitudes: (NDArrayFloat[findex, turbines]): awc excitation amplitude for each
turbine [deg].
- tilt_interps (Iterable[tuple]): The tilt interpolation functions for each
turbine.
- turbine_type_map: (NDArrayObject[wd, ws, turbines]): The Turbine type definition for
each turbine.
turbine_power_thrust_tables: Reference data for the power and thrust representation ix_filter (NDArrayInt, optional): The boolean array, or
integer indices to filter out before calculation. Defaults to None.
- average_method (str, optional): The method for averaging over turbine rotor points
to determine a rotor-average wind speed. Defaults to "cubic-mean".
- cubature_weights (NDArrayFloat | None): Weights for cubature averaging methods. Defaults to
None.
- multidim_condition (tuple | None): The condition tuple used to select the appropriate
thrust coefficient relationship for multidimensional power/thrust tables. Defaults to None.
- Returns:
NDArrayFloat: The power, in Watts, for each turbine after adjusting for yaw and tilt.
- floris.core.turbine.turbine.thrust_coefficient(velocities, turbulence_intensities, air_density, yaw_angles, tilt_angles, power_setpoints, awc_modes, awc_amplitudes, thrust_coefficient_functions, tilt_interps, correct_cp_ct_for_tilt, turbine_type_map, turbine_power_thrust_tables, ix_filter=None, average_method='cubic-mean', cubature_weights=None, multidim_condition=None)[source]#
Thrust coefficient of a turbine. The value is obtained from the coefficient of thrust specified by the callables specified in the thrust_coefficient_functions.
- Return type:
ndarray
[Any
,dtype
[float64
]]- Parameters:
velocities (ndarray[Any, dtype[float64]])
turbulence_intensities (ndarray[Any, dtype[float64]])
air_density (float)
yaw_angles (ndarray[Any, dtype[float64]])
tilt_angles (ndarray[Any, dtype[float64]])
power_setpoints (ndarray[Any, dtype[float64]])
awc_modes (ndarray[Any, dtype[str_]])
awc_amplitudes (ndarray[Any, dtype[float64]])
thrust_coefficient_functions (dict[str, Callable])
tilt_interps (dict[str, interp1d])
correct_cp_ct_for_tilt (ndarray[Any, dtype[bool_]])
turbine_type_map (ndarray[Any, dtype[object_]])
turbine_power_thrust_tables (dict)
ix_filter (ndarray[Any, dtype[int64]] | ndarray[Any, dtype[bool_]] | Iterable[int] | None)
average_method (str)
cubature_weights (ndarray[Any, dtype[float64]] | None)
multidim_condition (tuple | None)
- Args:
- velocities (NDArrayFloat[findex, turbines, grid1, grid2]): The velocity field at
a turbine.
- turbulence_intensities (NDArrayFloat[findex, turbines]): The turbulence intensity at
each turbine.
air_density (float): air density for simulation [kg/m^3] yaw_angles (NDArrayFloat[findex, turbines]): The yaw angle for each turbine. tilt_angles (NDArrayFloat[findex, turbines]): The tilt angle for each turbine. power_setpoints: (NDArrayFloat[findex, turbines]): Maximum power setpoint for each
turbine [W].
- awc_modes: (NDArrayStr[findex, turbines]): awc excitation mode (currently, only "baseline"
and "helix" are implemented).
- awc_amplitudes: (NDArrayFloat[findex, turbines]): awc excitation amplitude for each
turbine [deg].
- thrust_coefficient_functions (dict): The thrust coefficient functions for each turbine. Keys
are the turbine type string and values are the callable functions.
- tilt_interps (Iterable[tuple]): The tilt interpolation functions for each
turbine.
- correct_cp_ct_for_tilt (NDArrayBool[findex, turbines]): Boolean for determining if the
turbines Cp and Ct should be corrected for tilt.
- turbine_type_map: (NDArrayObject[findex, turbines]): The Turbine type definition
for each turbine.
- ix_filter (NDArrayFilter | Iterable[int] | None, optional): The boolean array, or
integer indices as an iterable of array to filter out before calculation. Defaults to None.
- average_method (str, optional): The method for averaging over turbine rotor points
to determine a rotor-average wind speed. Defaults to "cubic-mean".
- cubature_weights (NDArrayFloat | None): Weights for cubature averaging methods. Defaults to
None.
- multidim_condition (tuple | None): The condition tuple used to select the appropriate
thrust coefficient relationship for multidimensional power/thrust tables. Defaults to None.
- Returns:
NDArrayFloat: Coefficient of thrust for each requested turbine.
- floris.core.turbine.turbine.axial_induction(velocities, turbulence_intensities, air_density, yaw_angles, tilt_angles, power_setpoints, awc_modes, awc_amplitudes, axial_induction_functions, tilt_interps, correct_cp_ct_for_tilt, turbine_type_map, turbine_power_thrust_tables, ix_filter=None, average_method='cubic-mean', cubature_weights=None, multidim_condition=None)[source]#
Axial induction factor of the turbine incorporating the thrust coefficient and yaw angle.
- Return type:
ndarray
[Any
,dtype
[float64
]]- Parameters:
velocities (ndarray[Any, dtype[float64]])
turbulence_intensities (ndarray[Any, dtype[float64]])
air_density (float)
yaw_angles (ndarray[Any, dtype[float64]])
tilt_angles (ndarray[Any, dtype[float64]])
power_setpoints (ndarray[Any, dtype[float64]])
awc_modes (ndarray[Any, dtype[str_]])
awc_amplitudes (ndarray[Any, dtype[float64]])
axial_induction_functions (dict)
tilt_interps (ndarray[Any, dtype[object_]])
correct_cp_ct_for_tilt (ndarray[Any, dtype[bool_]])
turbine_type_map (ndarray[Any, dtype[object_]])
turbine_power_thrust_tables (dict)
ix_filter (ndarray[Any, dtype[int64]] | ndarray[Any, dtype[bool_]] | Iterable[int] | None)
average_method (str)
cubature_weights (ndarray[Any, dtype[float64]] | None)
multidim_condition (tuple | None)
- Args:
- velocities (NDArrayFloat): The velocity field at each turbine; should be shape:
(number of turbines, ngrid, ngrid), or (ngrid, ngrid) for a single turbine.
- turbulence_intensities (NDArrayFloat[findex, turbines]): The turbulence intensity at
each turbine.
air_density (float): air density for simulation [kg/m^3] yaw_angles (NDArrayFloat[findex, turbines]): The yaw angle for each turbine. tilt_angles (NDArrayFloat[findex, turbines]): The tilt angle for each turbine. power_setpoints: (NDArrayFloat[findex, turbines]): Maximum power setpoint for each
turbine [W].
- awc_amplitudes: (NDArrayFloat[findex, turbines]): awc excitation amplitude for each
turbine [deg].
- axial_induction_functions (dict): The axial induction functions for each turbine. Keys are
the turbine type string and values are the callable functions.
- tilt_interps (Iterable[tuple]): The tilt interpolation functions for each
turbine.
- correct_cp_ct_for_tilt (NDArrayBool[findex, turbines]): Boolean for determining if the
turbines Cp and Ct should be corrected for tilt.
- turbine_type_map: (NDArrayObject[findex, turbines]): The Turbine type definition
for each turbine.
- ix_filter (NDArrayFilter | Iterable[int] | None, optional): The boolean array, or
integer indices (as an array or iterable) to filter out before calculation. Defaults to None.
- average_method (str, optional): The method for averaging over turbine rotor points
to determine a rotor-average wind speed. Defaults to "cubic-mean".
- cubature_weights (NDArrayFloat | None): Weights for cubature averaging methods. Defaults to
None.
- multidim_condition (tuple | None): The condition tuple used to select the appropriate
thrust coefficient relationship for multidimensional power/thrust tables. Defaults to None.
- Returns:
Union[float, NDArrayFloat]: [description]
- class floris.core.turbine.turbine.Turbine(turbine_type, rotor_diameter, hub_height, TSR, power_thrust_table={}, operation_model='cosine-loss', correct_cp_ct_for_tilt=False, floating_tilt_table=None, multi_dimensional_cp_ct=False, power_thrust_data_file=None, turbine_library_path=PosixPath('/home/runner/work/floris/floris/floris/turbine_library'))[source]#
A class containing the parameters and infrastructure to model a wind turbine's performance for a particular atmospheric condition.
- Args:
turbine_type (str): An identifier for this type of turbine such as "NREL_5MW". rotor_diameter (float): The rotor diameter in meters. hub_height (float): The hub height in meters. TSR (float): The Tip Speed Ratio of the turbine. power_thrust_table (dict[str, float]): Contains power coefficient and thrust coefficient
values at a series of wind speeds to define the turbine performance. The dictionary must have the following three keys with equal length values:
- {
"wind_speeds": List[float], "power": List[float], "thrust": List[float],
}
or, contain a key "power_thrust_data_file" pointing to the power/thrust data. Optionally, power_thrust_table may include parameters for use in the turbine submodel, for example:
- cosine_loss_exponent_yaw (float): The cosine exponent relating the yaw misalignment
angle to turbine power.
- cosine_loss_exponent_tilt (float): The cosine exponent relating the rotor tilt angle
to turbine power.
- ref_air_density (float): The density at which the provided Cp and Ct curves are
defined.
- ref_tilt (float): The implicit tilt of the turbine for which the Cp and Ct
curves are defined. This is typically the nacelle tilt.
- correct_cp_ct_for_tilt (bool): A flag to indicate whether to correct Cp and Ct for tilt
usually for a floating turbine. Optional, defaults to False.
- floating_tilt_table (dict[str, float]): Look up table of tilt angles at a series of
- wind speeds. The dictionary must have the following keys with equal length values:
- {
"wind_speeds": List[float], "tilt": List[float],
}
Required if correct_cp_ct_for_tilt = True. Defaults to None.
- multi_dimensional_cp_ct (bool): Use a multidimensional power_thrust_table. Defaults to
False.
- Parameters:
turbine_type (str)
rotor_diameter (float)
hub_height (float)
TSR (float)
power_thrust_table (dict)
operation_model (str)
correct_cp_ct_for_tilt (bool)
floating_tilt_table (dict[str, NDArrayFloat] | None)
multi_dimensional_cp_ct (bool)
power_thrust_data_file (str)
turbine_library_path (str | Path)
- turbine_type: str#
- rotor_diameter: float#
- hub_height: float#
- TSR: float#
- power_thrust_table: dict#
- operation_model: str#
- correct_cp_ct_for_tilt: bool#
- floating_tilt_table: dict[str, NDArrayFloat] | None#
- multi_dimensional_cp_ct: bool#
- rotor_radius: float#
- rotor_area: float#
- thrust_coefficient_function: Callable#
- axial_induction_function: Callable#
- power_function: Callable#
- tilt_interp: interp1d#
- power_thrust_data_file: str#
- turbine_library_path: Path#
- condition_keys: list[str]#
- check_power_thrust_table(instance, value)[source]#
Verify that the power and thrust tables are given with arrays of equal length to the wind speed array.
- Return type:
None
- Parameters:
instance (Attribute)
value (dict)
- reset_rotor_diameter_dependencies(instance, value)[source]#
Resets the rotor_radius and rotor_area attributes.
- Return type:
None
- Parameters:
instance (Attribute)
value (float)
- reset_rotor_radius(instance, value)[source]#
Resets the rotor_diameter value to trigger the recalculation of rotor_diameter, rotor_radius and rotor_area.
- Return type:
None
- Parameters:
instance (Attribute)
value (float)
- reset_rotor_area(instance, value)[source]#
Resets the rotor_radius value to trigger the recalculation of rotor_diameter, rotor_radius and rotor_area.
- Return type:
None
- Parameters:
instance (Attribute)
value (float)