Replies: 1 comment 2 replies
-
Hi @niajhsaka , Thanks for clearly articulating your question and providing the source code needed to generate the issue---that's much appreciated! Sorry that it has taken me some time to get back to you. I seem to have found why there is a discrepancy. The issue is that the You can get around this by specifying the wind directions and wind speeds for the wind rose manually, i.e. using code such as wind_rose = WindRose(
wind_directions=wds,
wind_speeds=wss,
freq_table=frequencies,
ti_table=0.06
) Here is a modified version of the code you sent. import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from floris import (
FlorisModel,
WindRose,
)
rebuild_wind_rose = True
fmodel = FlorisModel("inputs/gch_env_test.yaml")
# Load the wind rose from csv as in example 003
wind_rose = WindRose.read_csv_long(
"inputs/wind_rose_V7.csv", wd_col="wd", ws_col="ws", freq_col="freq_val", ti_col_or_value=0.0
)
print(wind_rose.wind_speeds) # Don't exactly match the wind speeds in the csv file
df = pd.read_csv("inputs/wind_rose_V7.csv")
wds = df["wd"].unique()
wss = df["ws"].unique()
if rebuild_wind_rose: # Manually create wind rose
wind_rose = WindRose(
wind_directions=wds,
wind_speeds=wss,
freq_table=df["freq_val"].values.reshape(len(df["wd"].unique()), len(df["ws"].unique())),
ti_table=0.06
)
print(wind_rose.wind_speeds) # Exactly match the wind speeds in the csv file
# Store some values
n_wd = len(wind_rose.wind_directions)
n_ws = len(wind_rose.wind_speeds)
# Store the number of elements of the freq_table which are 0
n_zeros = np.sum(wind_rose.freq_table == 0)
# Set the wind rose
fmodel.set(wind_data=wind_rose, wind_shear=0.0)
# Run the model
fmodel.run()
# Note that the frequency table contains 0 frequency for some wind directions and wind speeds
# and we've not selected to compute 0 frequency bins, therefore the n_findex will be less than
# the total number of wind directions and wind speed combinations
print(f"Total number of wind direction and wind speed combination: {n_wd * n_ws}")
print(f"Number of 0 frequency bins: {n_zeros}")
print(f"n_findex: {fmodel.n_findex}")
# Get the AEP
aep = fmodel.get_farm_AEP()
# Print the AEP
print(f"AEP from wind rose: {aep/1E9:.3f} (GWh)")
# Run the model again, without wakes, and use the result to compute the wake losses
fmodel.run_no_wake()
# Get the AEP without wake
aep_no_wake = fmodel.get_farm_AEP()
# Compute the wake losses
wake_losses = 100 * (aep_no_wake - aep) / aep_no_wake
# Print the wake losses
print(f"Wake losses: {wake_losses:.2f}%")
tpowers = fmodel.get_turbine_powers() / 1000.0 # Convert to kW
fig, ax = plt.subplots(1,1)
ax.scatter(wind_rose.wind_speeds, tpowers[0,:], marker="o", color="C0", label="simulated")
turb_dict_powercurve = fmodel.core.farm.turbine_definitions[0]["power_thrust_table"]
ax.scatter(turb_dict_powercurve["wind_speed"], turb_dict_powercurve["power"], marker="x",
color="red", label="power curve")
ax.legend()
ax.set_xlabel("Wind Speed (m/s)")
ax.set_ylabel("Power (kW)")
plt.show() If you set On the other hand, you can try setting Best, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to verify the AEP calculation of FLORIS with WAsP and through manual calculation in a spreadsheet, however I am getting a difference of about 4%-5% between FLORIS and WAsP. WAsP and the manual calculation match closely.
These are the conditions that I am simulating in WAsP:
The above setup in WAsP are matched in FLORIS by:
WAsP yields an AEP of 8.169 GWh.
I ran the calculation in a spreadsheet by matching the wind speed bins with power production curve and multiplying with frequency. I used 0.25 m/s granularity. This yielded 8.171 GWh, closely matching WAsP. The power density in the spreadsheet (153.75 W/m2) also closely matches the value in WAsP (154 W/m2). I have attached this spreadsheet with the message.
When I run the same calculation in FLORIS, I get 8.57 GWh as the AEP. I have attached the FLORIS files as well
Could you do a quick review and advice as to why there is such a big discrepancy between FLORIS and WAsP.
Compute AEP_Test.xlsx
FLORIS Files.zip
Beta Was this translation helpful? Give feedback.
All reactions