Hello everyone,
I'm trying to create a code to simulate wind turbine but it doesn't working, maybe this is the wind resource file format but i don't know. I have tried several solution but it still doesn't working.
Here is the code that i created :
import PySAM.Windpower as wp
# Create a Windpower object
wind_turbine = wp.default("WindPowerSingleOwner")
# Set the turbine parameters
wind_turbine.system_capacity = 200 # Turbine capacity in kW
wind_turbine.max_cp = 0.45 # Maximum power coefficient
wind_turbine.max_tip_speed = 80 # Maximum tip speed in m/s
wind_turbine.cut_in_speed = 3 # Cut-in wind speed in m/s
wind_turbine.cut_out_speed = 25 # Cut-out wind speed in m/s
# Set the wind resource file path
wind_resource_file = "C:/Users/arthu/OneDrive/Documents/INTERNSHIP/SAM/05-07-2023/gwa-plot-data_2023-07-05168854452419108_08_44_UTC.zip/windSpeed.csv"
wind_turbine.Resource.wind_resource_data = [wind_resource_file]
# Run the simulation
wind_turbine.execute()
# Access the wind turbine outputs
annual_energy = wind_turbine.Outputs.annual_energy
# Print the annual energy production
print("Annual Energy Production:", annual_energy, "kWh")
When i execute this code, it display me this message error :Cell In[58], line 15
13 # Set the wind resource file path
14 wind_resource_file = "C:/Users/arthu/OneDrive/Documents/INTERNSHIP/SAM/05-07-2023/gwa-plot-data_2023-07-05168854452419108_08_44_UTC.zip/windSpeed.csv"
---> 15 wind_turbine.Resource.wind_resource_data = [wind_resource_file]
17 # Run the simulation
18 wind_turbine.execute()
Exception: Table must be set from dict.
I don't know how to resolve this problem. I will be very glad if someone car help me.