You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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())
I think this is happening because the NREL-5MW, by default, uses the "cosine-loss" operation model. So, when fmodel.set(turbine_type=["nrel_5mw", "nrel_5mw"]) is executed, the operation model is set to "cosine-loss", which doesn't respond to a power setpoint.
It's a little unclear what the "correct" behavior is here. For now, I think running
# Specify the turbine types using a listfmodel.set(turbine_type=["nrel_5mw", "nrel_5mw"])
fmodel.set_operation_model("simple-derating")
fmodel.set(power_setpoints=power_setpoints)
fmodel.run()
should work (i.e., specifying the "simple-derating" operation model after setting the turbine types).
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
Relevant output
The first printout is (correct)
The second (ignores the power setpoints)
Floris version
Develop branch
System Information
macOS
The text was updated successfully, but these errors were encountered: