entering 35040 wind_resource data but SAM outputs 8760 generation

2 posts / 0 new
Last post
smishra732
entering 35040 wind_resource data but SAM outputs 8760 generation

Hi Paul,

My goal is to output system generation (or system power) given wind_resource data as input to SAM. I am giving 35040 wind_resource data but the output is 8760 generation. The code is:

ssc = PySSC()
ssc.module_exec_set_print(0)
data = ssc.data_create()
module = ssc.module_create('windpower')

wind_resource = ssc.data_create()

ssc.data_set_number(wind_resource, 'latitude', self.latitude)
ssc.data_set_number(wind_resource, 'longitude', self.longitude)
ssc.data_set_number(wind_resource, 'elevation', self.elevation)
ssc.data_set_number(wind_resource, 'year', self.year)
heights = [self.hub_height_meters, self.hub_height_meters, self.hub_height_meters, self.hub_height_meters]
ssc.data_set_array(wind_resource, 'heights', heights)
fields = [1, 2, 3, 4]
ssc.data_set_array(wind_resource, 'fields', fields)

# temperature_celsius, pressure_atmospheres, wind_meters_per_sec and wind_direction_degrees are all of length 35040

data_matrix = np.matrix([self.temperature_celsius, self.pressure_atmospheres, self.wind_meters_per_sec, self.wind_direction_degrees])
data_matrix = data_matrix.transpose()
ssc.data_set_matrix(wind_resource, 'data', data_matrix.tolist() )

ssc.data_set_table(data, 'wind_resource_data', wind_resource)
ssc.data_set_number(data, 'wind_resource_shear', 0.14000000059604645)
ssc.data_set_number(data, 'wind_resource_turbulence_coeff', 0.10000000149011612)
ssc.data_set_number(data, 'system_capacity', self.system_capacity)
ssc.data_set_number(data, 'wind_resource_model_choice', 0)
ssc.data_set_number(data, 'weibull_reference_height', 50)
ssc.data_set_number(data, 'weibull_k_factor', 2)
ssc.data_set_number(data, 'weibull_wind_speed', 7.25)
ssc.data_set_number(data, 'wind_turbine_rotor_diameter', self.rotor_diameter)
ssc.data_set_array(data, 'wind_turbine_powercurve_windspeeds', self.wind_turbine_speeds)
ssc.data_set_array(data, 'wind_turbine_powercurve_powerout', self.wind_turbine_powercurve);
ssc.data_set_number(data, 'wind_turbine_hub_ht', self.hub_height_meters)
ssc.data_set_number(data, 'wind_turbine_max_cp', 0.44999998807907104)
wind_farm_xCoordinates = [0]
ssc.data_set_array(data, 'wind_farm_xCoordinates', wind_farm_xCoordinates)
wind_farm_yCoordinates = [0]
ssc.data_set_array(data, 'wind_farm_yCoordinates', wind_farm_yCoordinates)
ssc.data_set_number(data, 'wind_farm_losses_percent', 0)
ssc.data_set_number(data, 'wind_farm_wake_model', 0)
ssc.data_set_number(data, 'adjust:constant', 0)

ssc.data_free(wind_resource)
self.ssc = ssc
self.data = data
self.module = module

self.ssc.module_free(self.module)
system_power = self.ssc.data_get_array(self.data, 'gen')

# this system power is 8760. I expect it to be 35040.
Thanks for your time in advance..

Tags: 
Paul Gilman

Hi,

This should work. Would you mind emailing me the data (or a link to the data) you are working with?

Best regards,
Paul.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer