def run(self): print("Thread " + str(self.input_file)) weather = get_weather_data(filename="weather" + str(self.input_file) + ".csv") #print(weather[['wind_speed', 'temperature', 'pressure']][0:3]) # initialize WindTurbine object t = WindTurbine(**self.turbine) # initialize ModelChain with own specifications and use run_model method to # calculate power output mc_t = ModelChain(t, **self.modelchain_data).run_model(weather) # write power output time series to WindTurbine object t.power_output = mc_t.power_output power_file = open("power" + str(self.input_file) + ".csv", "w") power_file.write(t.power_output.to_csv()) print("Thread " + str(self.input_file) + " finished")
'density_model': 'ideal_gas', # 'barometric' (default), 'ideal_gas' # or 'interpolation_extrapolation' 'temperature_model': 'linear_gradient', # 'linear_gradient' (def.) or # 'interpolation_extrapolation' 'power_output_model': 'power_curve', # 'power_curve' (default) or # 'power_coefficient_curve' 'density_correction': True, # False (default) or True 'obstacle_height': 0, # default: 0 'hellman_exp': None } # None (default) or None # initialize ModelChain with own specifications and use run_model method to # calculate power output mc_e126 = ModelChain(e126, **modelchain_data).run_model(weather) # write power output time series to WindTurbine object e126.power_output = mc_e126.power_output enercon_e115 = { 'turbine_type': 'E-115/3000', # turbine type as in oedb turbine library 'hub_height': 92 # in m } # initialize WindTurbine object e115 = WindTurbine(**enercon_e115) # power output calculation for e115 # own specifications for ModelChain setup modelchain_data_e115 = { 'wind_speed_model': 'logarithmic', # 'logarithmic' (default), # 'hellman' or # 'interpolation_extrapolation'
# 'fetch_curve' to 'power_coefficient_curve' enerconE126 = { 'name': 'ENERCON E 126 7500', # turbine name as in register 'hub_height': 135, # in m 'rotor_diameter': 127, # in m 'fetch_curve': 'power_curve' # fetch power curve } # initialise WindTurbine object e126 = WindTurbine(**enerconE126) # power output calculation for my_turbine # initialise ModelChain with default parameters and use run_model # method to calculate power output mc_my_turbine = ModelChain(my_turbine).run_model(weather) # write power output timeseries to WindTurbine object my_turbine.power_output = mc_my_turbine.power_output # power output calculation for e126 # own specifications for ModelChain setup modelchain_data = { 'wind_speed_model': 'logarithmic', # 'logarithmic' (default), # 'hellman' or # 'interpolation_extrapolation' 'density_model': 'ideal_gas', # 'barometric' (default), 'ideal_gas' # or 'interpolation_extrapolation' 'temperature_model': 'linear_gradient', # 'linear_gradient' (def.) or # 'interpolation_extrapolation' 'power_output_model': 'power_curve', # 'power_curve' (default) or # 'power_coefficient_curve' 'density_correction': True, # False (default) or True 'obstacle_height': 0, # default: 0