-
Hey, First of all thank you for the update you have done on Floris, I have a question that concern the new added model (Emgauss), in fact I can't call and use it directly to compute the AEP of a WF or to vizualise the velocity profiles as I did before for NOJ, CC, GCH and TP. The script I've used it below. import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import floris.tools.visualization as wakeviz
from floris.tools import FlorisInterface
from floris.tools.visualization import (
calculate_horizontal_plane_with_turbines,
#visualize_cut_plane,
)
layout= "S1_Layout.csv"
df_layout = pd.read_csv(layout)
print("The wind farm layout dataframe looks as follows: \n\n {} \n".format(df_layout))
x_array=np.array(df_layout["x"].unique(), dtype=float)
y_array=np.array(df_layout["y"].unique(), dtype=float)
x_grid, y_grid = np.meshgrid(x_array, y_array, indexing="ij")
#fi = FlorisInterface("cc.yaml")
fi = FlorisInterface("emgauss.yaml") # Empirical Gauss
fi.reinitialize(
layout_x=x_array,
layout_y=y_array,
)
horizontal_plane = fi.calculate_horizontal_plane(
x_resolution=200,
y_resolution=100,
height=92.0,
yaw_angles=np.array([[[25.,25.,0.,-25.,25.0,25,0,0,0,0,0,25,0,0,25,0,25,0,0,25,0,0,0,25,0,0,-25,0,0,0,25,0,0,25,0,0,-25,0,25,0,-25,0,-25,0,25,0,0,-25,0,0,25,0,0,25,0,-25,0,-25,0,25,0,25,0,25,0,-25,25,0,-25,0,0,0,-25,0,25,-25,25,-25,25,-25,25,0,-25,25,25,0,-25,0,25,-25,25,-25,25,-25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]]),
)
fig = plt.subplots(1, 1, figsize=(8, 8))
wakeviz.visualize_cut_plane(horizontal_plane, title="Velocity profile vizualisation on Floris using Jensen Wake Model",color_bar=True)
fi.calculate_wake()
wakeviz.show_plots() and I had this error message:
I also tried this: import numpy as np
import pandas as pd
from scipy.interpolate import NearestNDInterpolator
from floris.tools import FlorisInterface
import time
import matplotlib.pyplot as plt
t = time.time()
wr = "wind_rose.csv"
df_wr = pd.read_csv(wr)
print("The wind rose dataframe looks as follows: \n\n {} \n".format(df_wr))
layout= "S1_Layout.csv"
df_layout = pd.read_csv(layout)
print("The wind farm layout dataframe looks as follows: \n\n {} \n".format(df_layout))
wd_array = np.array(df_wr["wd"].unique(), dtype=float)
ws_array = np.array(df_wr["ws"].unique(), dtype=float)
wd_grid, ws_grid = np.meshgrid(wd_array, ws_array, indexing="ij")
freq_interp = NearestNDInterpolator(df_wr[["wd", "ws"]], df_wr["freq_val"])
freq = freq_interp(wd_grid, ws_grid)
x_array=np.array(df_layout["x"].unique(), dtype=float)
y_array=np.array(df_layout["y"].unique(), dtype=float)
x_grid, y_grid = np.meshgrid(x_array, y_array, indexing="ij")
freq = freq / np.sum(freq)
#fi = FlorisInterface("jensen.yaml") # GCH model
#fi = FlorisInterface("cc.yaml") # CumulativeCurl model
#fi = FlorisInterface("jensen.yaml") # jensen model
#fi = FlorisInterface("turbopark.yaml") # Turbopark model
fi = FlorisInterface("emgauss.yaml") # Empirical Gauss
D = 164.0 # Rotor diameter for the NREL 5 MW
fi.reinitialize(
layout_x=x_array,
layout_y=y_array,
wind_directions=wd_array,
wind_speeds=ws_array,
)
aep = fi.get_farm_AEP(freq=freq)
print("Farm AEP (default options): {:.3f} GWh".format(aep / 1.0e9))
aep_no_wake = fi.get_farm_AEP(freq, no_wake=True)
print("Farm AEP (no_wake=True): {:.3f} GWh".format(aep_no_wake / 1.0e9))
print ("Computation time (AEP + flowmap):", time.time()-t) And I got the same error message. I am interested in studying the behavior of the new Emperical model and wanna know if there is any special way to handle it so I can avoid these errors. Thank you Sincerly Oussama |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @Ooussamaa, I'm sorry for the long delay before replying. I have not been able to reproduce your issue, unfortunately. I've run the following script, modified from yours with a made-up layout:
This runs fine for me. By the error you are receiving, it seems that perhaps your version of FLORIS has not yet updated to version 3.4 (those errors indicate that the version of FLORIS you have installed does not have the Empirical Gaussian model code, so is not compatible with the emgauss.yaml input file). You can check this by running
If the version is less than 3.4, try pip upgrading your FLORIS installation ( |
Beta Was this translation helpful? Give feedback.
-
Hi @misi9170, Now it Works Finlay, Thank you. Best regards ! Oussama |
Beta Was this translation helpful? Give feedback.
Hi @Ooussamaa, I'm sorry for the long delay before replying. I have not been able to reproduce your issue, unfortunately.
I've run the following script, modified from yours with a made-up layout: