Beispiel #1
0
    def solve_nonlinear(self, params, unknowns, resids):

        nTurbines = self.nTurbines

        global nCalls_obj
        nCalls_obj += 1

        turbineX = params['turbineX']
        turbineY = params['turbineY']
        turbineZ = params['turbineZ']
        rotorDiameter = params['rotorDiameter']
        Ct = params['Ct']
        yaw = params['yaw']

        windDirections = params['windDirections']
        windSpeeds = params['windSpeeds']
        windFrequencies = params['windFrequencies']

        RotorPointsY = params['RotorPointsY']
        RotorPointsZ = params['RotorPointsZ']

        ct_curve_wind_speed = params['ct_curve_wind_speed']
        ct_curve_ct = params['ct_curve_ct']

        shear_exp = params['shear_exp']
        rated_ws = params['rated_ws']
        rated_power = params['rated_power']
        cut_in_speed = params['cut_in_speed']
        cut_out_speed = params['cut_out_speed']
        zref = params['zref']
        z0 = params['z0']
        ky = params['ky']
        kz = params['kz']
        alpha = params['alpha']
        beta = params['beta']
        TI = params['TI']
        relaxationFactor = params['relaxationFactor']
        sm_smoothing = params['sm_smoothing']
        generator_efficiency = params['generator_efficiency']

        wake_combination_method = params['wake_combination_method']
        ti_calculation_method = params['ti_calculation_method']
        wake_model_version = params['wake_model_version']
        interp_type = params['interp_type']
        calc_k_star = params['calc_k_star']
        print_ti = params['print_ti']
        use_ct_curve = params['use_ct_curve']

        turbineYd = np.zeros((nTurbines, nTurbines))
        turbineXd = np.eye(nTurbines)
        _, daep_dx = full_aep.calcaep_dv(
            turbineX, turbineXd, turbineY, turbineYd, turbineZ, rotorDiameter,
            Ct, yaw, windDirections, windSpeeds, windFrequencies, shear_exp,
            rated_ws, rated_power, cut_in_speed, cut_out_speed, zref, z0, ky,
            kz, alpha, beta, TI, relaxationFactor, RotorPointsY, RotorPointsZ,
            ct_curve_wind_speed, ct_curve_ct, sm_smoothing,
            wake_combination_method, ti_calculation_method, wake_model_version,
            interp_type, calc_k_star, print_ti, use_ct_curve)

        turbineXd = np.zeros((nTurbines, nTurbines))
        turbineYd = np.eye(nTurbines)
        aep, daep_dy = full_aep.calcaep_dv(
            turbineX, turbineXd, turbineY, turbineYd, turbineZ, rotorDiameter,
            Ct, yaw, windDirections, windSpeeds, windFrequencies, shear_exp,
            rated_ws, rated_power, cut_in_speed, cut_out_speed, zref, z0, ky,
            kz, alpha, beta, TI, relaxationFactor, RotorPointsY, RotorPointsZ,
            ct_curve_wind_speed, ct_curve_ct, sm_smoothing,
            wake_combination_method, ti_calculation_method, wake_model_version,
            interp_type, calc_k_star, print_ti, use_ct_curve)

        self.daep_dx = daep_dx * generator_efficiency
        self.daep_dy = daep_dy * generator_efficiency
        unknowns['negAEP'] = -aep * generator_efficiency
Beispiel #2
0
# RotorPointsY = np.array([0.])
# RotorPointsZ = np.array([0.])
nRotorPoints = 4
RotorPointsY, RotorPointsZ = sunflower_points(nRotorPoints)
print 'RotorPointsY: ', RotorPointsY
print 'RotorPointsZ: ', RotorPointsZ

import time
s = time.time()
turbineXd = np.zeros((nTurbines, nTurbines))
turbineYd = np.zeros((nTurbines, nTurbines))
turbineXd = np.eye(nTurbines)
aep, daep_dx = full_aep.calcaep_dv(
    turbineX, turbineXd, turbineY, turbineYd, turbineZ, rotorDiameter, Ct, yaw,
    windDirections, windSpeeds, windFrequencies, shear_exp, rated_ws,
    rated_power, cut_in_speed, cut_out_speed, zref, z0, ky, kz, alpha, beta,
    TI, relaxationFactor, RotorPointsY, RotorPointsZ, ct_curve_wind_speed,
    ct_curve_ct, sm_smoothing, wake_combination_method, ti_calculation_method,
    wake_model_version, interp_type, calc_k_star, print_ti, use_ct_curve)

turbineXd = np.zeros((nTurbines, nTurbines))
turbineYd = np.zeros((nTurbines, nTurbines))
turbineYd = np.eye(nTurbines)
aep, daep_dy = full_aep.calcaep_dv(
    turbineX, turbineXd, turbineY, turbineYd, turbineZ, rotorDiameter, Ct, yaw,
    windDirections, windSpeeds, windFrequencies, shear_exp, rated_ws,
    rated_power, cut_in_speed, cut_out_speed, zref, z0, ky, kz, alpha, beta,
    TI, relaxationFactor, RotorPointsY, RotorPointsZ, ct_curve_wind_speed,
    ct_curve_ct, sm_smoothing, wake_combination_method, ti_calculation_method,
    wake_model_version, interp_type, calc_k_star, print_ti, use_ct_curve)
print time.time() - s