Add prestep to calculate_wake() call to set turbine operation #801
Replies: 4 comments 10 replies
-
@misi9170 I think this is really well-thought-through proposal and agree with all of it. I'm in favor! @rafmudaf , @bayc @ejsimley thoughts? |
Beta Was this translation helpful? Give feedback.
-
I like this! My only thought is: what happens if you reinitialize to a new set of wind conditions after setting your turbine operation?
|
Beta Was this translation helpful? Give feedback.
-
As I'm now looking into bring the |
Beta Was this translation helpful? Give feedback.
-
The workflow discussed here ( |
Beta Was this translation helpful? Give feedback.
-
In v3, wind conditions are passed to the
FlorisInterface
object with thereinitialize()
method, whereas turbine operating setpoints (in particular,yaw_angles
) are set with thecalculate_wake()
method.I proposed that we add a middle step
set_operation()
to the usual procedure to set the turbine operation, and havecalculate_wake()
take no arguments. That is, rather than the existing paradigmwe switch to
To me, this is more explicit, and would also (in my opinion) more cleanly address the issue raised in #449, that turbine operating setpoints (
yaw_angles
) are "forgotten" before visualization calls (in the proposed paradigm,set_operation()
would be called once and any setpoints would be saved on theFlorisInterface
object).We've added various new "setpoint"-type arguments to Floris with v4 (adding
power_setpoints
#783,disable_turbines
in #799, and will be adding more for the Helix wake mixing model #796). Many of these need to be checked for adequacy and handled before setting onfi
, and that handling currently takes place incalculate_wake()
. This suggestion would also simplifycalculate_wake()
and move the handling of these setpoints to the proposedset_operation()
method.@paulf81 pointed out that this is a paradigm change that will break many users' scripts for running Floris. To maintain back-compatibility in v4, we could consider allowing
calculate_wake()
to take onlyyaw_angles
as an optional argument (the only one available in v3); if the user specifiesyaw_angles
incalculate_wake()
, a deprecation warning would be raised and the newset_operation()
method would be called withyaw_angles
passed through to it before executing the wake calculation. More generally,calculate_wake()
could raise a deprecation warning if any argument is passed to it, and all arguments passed could be passed through toset_operation()
(this would allow users to specify all setpoints in withcalculate_wake()
call until deprecation).On the other hand, various other changes at the user interface level (time series enforcement, in particular, along with possible renaming of the
FlorisInterface
) will mean that many scripts will need to be updated regardless.Beta Was this translation helpful? Give feedback.
All reactions