def wind_power_simulation(self): wind_df = pd.DataFrame() wind_df['wind_raw'] = self.resource_df.V2.apply( lambda x: power_from_turbine(x, 1, self.power_coefficient, self. cut_in_speed, self.rated_speed)) wind_df['wind_correction'] = resistance_power(self.resource_df, 1) wind_df[ 'wind_power'] = wind_df['wind_raw'] - wind_df['wind_correction'] self.wind = wind_df return wind_df['wind_power']
def sim_wind(self, area, power_coefficient=0.3, cut_in_speed=2, rated_speed=15): """ Simulation wind power generation considering the added resistance of wind due the wind turbine. :param area: float m^2 wind turbine swept area :param power_coefficient: float power coefficient of wind turbine :param cut_in_speed: float m/s cut-in speed of wind turbine :param rated_speed: float m/s cut-out speed of wind turbine :return: Nothing returned but wind_power Pandas series was created in class """ wind_df = self.get_resource_df # Apply wind speed to ideal wind turbine model, get power production correction due to speed wind_df['wind_power'] = wind_df.V2.apply(lambda x: power_from_turbine( x, area, power_coefficient, cut_in_speed, rated_speed )) - resistance_power(wind_df, area) self.wind_power_raw = wind_df.V2.apply(lambda x: power_from_turbine( x, area, power_coefficient, cut_in_speed, rated_speed)) self.wind_power = wind_df.wind_power pass