Open
Description
Setting the turbine type with a list causes power setpoints to be ignored
I've noticed an issue where if the turbine type is provided via a list, power_setpoints applied will be ignored.
How to reproduce
Adding this a test file into the examples folder will show the issue
from floris import (
FlorisModel,
TimeSeries,
)
import numpy as np
# Create a FlorisModel instance with simple derating
fmodel = FlorisModel("inputs/emgauss.yaml")
fmodel.set_operation_model("simple-derating")
# make a time series of 2 wind speeds
time_series = TimeSeries(
wind_speeds=np.array([8.0, 9.0]), wind_directions=270.0, turbulence_intensities=0.06
)
# Set to a 2 turbine layout
fmodel.set(layout_x=[0.0, 126 * 5], layout_y=[0.0, 0.0], wind_data=time_series)
# Set all power setpoints to 0
power_setpoints = np.zeros((2, 2))
fmodel.set(power_setpoints=power_setpoints)
fmodel.run()
# Correctly prints out a 2x2 matrix of 0s
print(fmodel.get_turbine_powers())
# Specify the turbine types using a list
fmodel.set(turbine_type=["nrel_5mw", "nrel_5mw"])
fmodel.set(power_setpoints=power_setpoints)
fmodel.run()
# Now ignores the power setpoints
print(fmodel.get_turbine_powers())
Relevant output
The first printout is (correct)
[[0. 0.]
[0. 0.]]
The second (ignores the power setpoints)
[[1753954.45917917 678834.8317748 ]
[2496427.86183577 987681.57314292]]
Floris version
Develop branch
System Information
macOS