GeneralWindFarmComponents.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:wake-exchange 作者: byuflowlab 项目源码 文件源码
def solve_nonlinear(self, params, unknowns, resids):

        # obtain necessary inputs
        direction_id = self.direction_id
        pP = self.params['gen_params:pP']

        wind_speed_ax = np.cos(self.params['yaw%i' % direction_id]*np.pi/180.0)**(pP/3.0)*self.params['wtVelocity%i' % direction_id]
        # use interpolation on precalculated CP-CT curve
        wind_speed_ax = np.maximum(wind_speed_ax, self.params['gen_params:windSpeedToCPCT_wind_speed'][0])
        wind_speed_ax = np.minimum(wind_speed_ax, self.params['gen_params:windSpeedToCPCT_wind_speed'][-1])
        self.unknowns['Cp_out'] = interp(wind_speed_ax, self.params['gen_params:windSpeedToCPCT_wind_speed'], self.params['gen_params:windSpeedToCPCT_CP'])
        self.unknowns['Ct_out'] = interp(wind_speed_ax, self.params['gen_params:windSpeedToCPCT_wind_speed'], self.params['gen_params:windSpeedToCPCT_CT'])

        # for i in range(0, len(self.unknowns['Ct_out'])):
        #     self.unknowns['Ct_out'] = max(max(self.unknowns['Ct_out']), self.unknowns['Ct_out'][i])
        # normalize on incoming wind speed to correct coefficients for yaw
        self.unknowns['Cp_out'] = self.unknowns['Cp_out'] * np.cos(self.params['yaw%i' % direction_id]*np.pi/180.0)**pP
        self.unknowns['Ct_out'] = self.unknowns['Ct_out'] * np.cos(self.params['yaw%i' % direction_id]*np.pi/180.0)**2
        # print 'in CPCT interp, wind_speed_hub = ', self.params['wtVelocity%i' % direction_id]
        # print 'in CPCT: ', params['velocitiesTurbines0']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号