Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
paulf81 committed Oct 26, 2023
1 parent f48067d commit b627b48
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
28 changes: 14 additions & 14 deletions examples_smarteole/06_wake_steering_energy_ratio_analysis.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions flasc/model_tuning/floris_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def sweep_velocity_model_parameter_for_overall_wake_losses(
# Assign the ref and test cols
df_scada = pl.from_pandas(df_scada_in)

df_scada = df_scada.with_columns(
pl.Series(name='simple_index', values=np.arange(0,df_scada.shape[0]))
)

# Trim to ws/wd
df_scada = df_scada.filter(
(pl.col('ws') >= ws_min) & # Filter the mean wind speed
Expand All @@ -92,6 +96,11 @@ def sweep_velocity_model_parameter_for_overall_wake_losses(
(pl.col('wd') < wd_max)
)

# Trim the yaw angle matrices
if yaw_angles is not None:
simple_index = df_scada['simple_index'].to_numpy()
yaw_angles = yaw_angles[simple_index,:,:]

ref_cols = [f'pow_{i:03d}' for i in ref_turbines]
test_cols = [f'pow_{i:03d}' for i in test_turbines]
df_scada = add_power_ref(df_scada, ref_cols)
Expand Down

0 comments on commit b627b48

Please sign in to comment.