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
Hetergenous map is sticking when expected behavior would be to remove
When applying a wind_data object to an FlorisModel that doesn't contain a HeterogeneousMap, after having applied one that does, it appears the HeterogeneousMap is still there
How to reproduce
Add this code as a file in examples:
from floris import (
FlorisModel,
TimeSeries,
HeterogeneousMap
)
import numpy as np
# Create a FlorisModel instance with simple derating
fmodel = FlorisModel("inputs/emgauss.yaml")
# make a time series of without het
time_series = TimeSeries(
wind_speeds=np.array([8.0]), wind_directions=0.0, turbulence_intensities=0.06
)
# Make a second time series with a het map
het_map = HeterogeneousMap(
wind_directions=np.array([0.0]),
x = [-100, -100, 126*7, 126*7],
y = [-500, 500, -500, 500],
speed_multipliers = [[1, 1,2, 2]]
)
time_series_2 = TimeSeries(
wind_speeds=np.array([8.0]), wind_directions=0.0, turbulence_intensities=0.06, heterogeneous_map=het_map
)
# Run without het
fmodel.set(layout_x=[10.0, 126 * 5], layout_y=[0.0, 0.0], wind_data=time_series)
fmodel.run()
print(fmodel.get_turbine_powers())
# Run with het
fmodel.set(wind_data=time_series_2)
fmodel.run()
print(fmodel.get_turbine_powers())
# Now without again
fmodel.set(layout_x=[10.0, 126 * 5], layout_y=[0.0, 0.0], wind_data=time_series)
fmodel.run()
print(fmodel.get_turbine_powers())
Hetergenous map is sticking when expected behavior would be to remove
When applying a wind_data object to an FlorisModel that doesn't contain a HeterogeneousMap, after having applied one that does, it appears the HeterogeneousMap is still there
How to reproduce
Add this code as a file in examples:
Relevant output
The expected output is:
However the current output is:
Floris version
Develop
System Information
macos
The text was updated successfully, but these errors were encountered: