floris.parallel_floris_model#
Classes
|
- class floris.parallel_floris_model.ParallelFlorisModel(fmodel, max_workers, n_wind_condition_splits, interface='multiprocessing', use_mpi4py=None, propagate_flowfield_from_workers=False, print_timings=False)[source]#
-
- set(wind_speeds=None, wind_directions=None, wind_shear=None, wind_veer=None, reference_wind_height=None, turbulence_intensities=None, air_density=None, layout=None, layout_x=None, layout_y=None, turbine_type=None, turbine_library_path=None, solver_settings=None, heterogeneous_inflow_config=None, wind_data=None, yaw_angles=None, power_setpoints=None, awc_modes=None, awc_amplitudes=None, awc_frequencies=None, disable_turbines=None)[source]#
Pass to the FlorisModel set function. To allow users to directly replace a FlorisModel object with this UncertainFlorisModel object, this function is required
- Args:
- wind_speeds (NDArrayFloat | list[float] | None, optional): Wind speeds at each findex.
Defaults to None.
- wind_directions (NDArrayFloat | list[float] | None, optional): Wind directions at each
findex. Defaults to None.
wind_shear (float | None, optional): Wind shear exponent. Defaults to None. wind_veer (float | None, optional): Wind veer. Defaults to None. reference_wind_height (float | None, optional): Reference wind height. Defaults to None. turbulence_intensities (NDArrayFloat | list[float] | None, optional): Turbulence
intensities at each findex. Defaults to None.
air_density (float | None, optional): Air density. Defaults to None. layout_x (NDArrayFloat | list[float] | None, optional): X-coordinates of the turbines.
Defaults to None.
- layout_y (NDArrayFloat | list[float] | None, optional): Y-coordinates of the turbines.
Defaults to None.
turbine_type (list | None, optional): Turbine type. Defaults to None. turbine_library_path (str | Path | None, optional): Path to the turbine library.
Defaults to None.
solver_settings (dict | None, optional): Solver settings. Defaults to None. heterogeneous_inflow_config (None, optional): heterogeneous inflow configuration.
Defaults to None.
wind_data (type[WindDataBase] | None, optional): Wind data. Defaults to None. yaw_angles (NDArrayFloat | list[float] | None, optional): Turbine yaw angles.
Defaults to None.
- power_setpoints (NDArrayFloat | list[float] | list[float, None] | None, optional):
Turbine power setpoints.
- disable_turbines (NDArrayBool | list[bool] | None, optional): NDArray with dimensions
n_findex x n_turbines. True values indicate the turbine is disabled at that findex and the power setpoint at that position is set to 0. Defaults to None.
- get_farm_AEP(freq, cut_in_wind_speed=None, cut_out_wind_speed=None, yaw_angles=None, turbine_weights=None, no_wake=False)[source]#
Estimate annual energy production (AEP) for distributions of wind speed, wind direction, frequency of occurrence, and yaw offset.
- Return type:
float
- Args:
- freq (NDArrayFloat): NumPy array with shape (n_wind_directions,
n_wind_speeds) with the frequencies of each wind direction and wind speed combination. These frequencies should typically sum up to 1.0 and are used to weigh the wind farm power for every condition in calculating the wind farm's AEP.
cut_in_wind_speed (float, optional): No longer supported. cut_out_wind_speed (float, optional): No longer supported. yaw_angles (NDArrayFloat | list[float] | None, optional):
The relative turbine yaw angles in degrees. If None is specified, will assume that the turbine yaw angles are all zero degrees for all conditions. Defaults to None.
- turbine_weights (NDArrayFloat | list[float] | None, optional):
weighing terms that allow the user to emphasize power at particular turbines and/or completely ignore the power from other turbines. This is useful when, for example, you are modeling multiple wind farms in a single floris object. If you only want to calculate the power production for one of those farms and include the wake effects of the neighboring farms, you can set the turbine_weights for the neighboring farms' turbines to 0.0. The array of turbine powers from floris is multiplied with this array in the calculation of the objective function. If None, this is an array with all values 1.0 and with shape equal to (n_wind_directions, n_wind_speeds, n_turbines). Defaults to None.
- no_wake: (bool, optional): When True updates the turbine
quantities without calculating the wake or adding the wake to the flow field. This can be useful when quantifying the loss in AEP due to wakes. Defaults to False.
- Returns:
- float:
The Annual Energy Production (AEP) for the wind farm in watt-hours.
- optimize_yaw_angles(minimum_yaw_angle=-25.0, maximum_yaw_angle=25.0, yaw_angles_baseline=None, x0=None, Ny_passes=[5, 4], turbine_weights=None, exclude_downstream_turbines=True, verify_convergence=False, print_worker_progress=False)[source]#
- get_operation_model()[source]#
Get the operation model of underlying fmodel.
- Returns:
str: The operation_model.
- set_operation_model(operation_model)[source]#
Set the operation model of underlying fmodel.
- Args:
operation_model (str): The operation model to set.
- get_param(param, param_idx=None)[source]#
Get the parameter of underlying fmodel.
- Args:
param (List[str]): A list of keys to traverse the FlorisModel dictionary. param_idx (Optional[int], optional): The index to get the value at. Defaults to None.
If None, the entire parameter is returned.
- Returns:
Any: The value of the parameter.
- set_param(param, value, param_idx=None)[source]#
Set the parameter of underlying fmodel.
- Args:
param (List[str]): A list of keys to traverse the FlorisModel dictionary. value (Any): The value to set. param_idx (Optional[int], optional): The index to set the value at. Defaults to None.
- property layout_x#
- property layout_y#
- property wind_speeds#
- property wind_directions#
- property turbulence_intensities#
- property n_findex#
- property n_turbines#