def test1(self):


        r_af = np.array([0.02222276, 0.06666667, 0.11111057, 0.16666667, 0.23333333, 0.3, 0.36666667, 0.43333333, 0.5, 0.56666667, 0.63333333, 0.7, 0.76666667, 0.83333333, 0.88888943, 0.93333333, 0.97777724])
        idx_cylinder = 3
        r_max_chord = 0.22
        Rhub = 1.5
        Rtip = 63.0
        chord_sub = np.array([3.2612, 4.5709, 3.3178, 1.4621])
        theta_sub = np.array([13.2783, 7.46036, 2.89317, -0.0878099])

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', GeometrySpline(), promotes=['*'])
        prob.root.add('r_af', IndepVarComp('r_af', np.zeros(len(r_af))), promotes=['*'])
        prob.root.add('idx_cylinder', IndepVarComp('idx_cylinder', 0), promotes=['*'])
        prob.root.add('r_max_chord', IndepVarComp('r_max_chord', 0.0), promotes=['*'])
        prob.root.add('Rhub', IndepVarComp('Rhub', 0.0), promotes=['*'])
        prob.root.add('Rtip', IndepVarComp('Rtip', 0.0), promotes=['*'])
        prob.root.add('chord_sub', IndepVarComp('chord_sub', np.zeros(len(chord_sub))), promotes=['*'])
        prob.root.add('theta_sub', IndepVarComp('theta_sub', np.zeros(len(theta_sub))), promotes=['*'])
        prob.setup(check=False)

        prob['r_af'] = r_af
        prob['idx_cylinder'] = idx_cylinder
        prob['r_max_chord'] = r_max_chord
        prob['Rhub'] = Rhub
        prob['Rtip'] = Rtip
        prob['chord_sub'] = chord_sub
        prob['theta_sub'] = theta_sub

        check_gradient_unit_test(self, prob, tol=5e-5)
Пример #2
0
    def test1(self):

        V_mean = 10.0
        V_hub = 11.7733866478
        turbulence_class = 'B'
        std = 3

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', GustETM(), promotes=['*'])
        prob.root.add('V_mean', IndepVarComp('V_mean', V_mean), promotes=['*'])
        prob.root.add('V_hub', IndepVarComp('V_hub', V_hub), promotes=['*'])
        prob.root.add('turbulence_class',
                      IndepVarComp('turbulence_class', Enum('A', 'B', 'C')),
                      promotes=['*'])
        prob.root.add('std', IndepVarComp('std', std), promotes=['*'])

        prob.setup(check=False)

        prob['V_mean'] = V_mean
        prob['V_hub'] = V_hub
        prob['V_hub'] = V_hub
        prob['turbulence_class'] = turbulence_class
        prob['std'] = std

        check_gradient_unit_test(self, prob)
Пример #3
0
    def test1(self):

        blade_mass = 17288.717087
        blade_moment_of_inertia = 11634376.0531
        tilt = 5.0
        nBlades = 3

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', MassProperties(), promotes=['*'])
        prob.root.add('blade_mass',
                      IndepVarComp('blade_mass', blade_mass),
                      promotes=['*'])
        prob.root.add('blade_moment_of_inertia',
                      IndepVarComp('blade_moment_of_inertia',
                                   blade_moment_of_inertia),
                      promotes=['*'])
        prob.root.add('tilt', IndepVarComp('tilt', tilt), promotes=['*'])
        prob.root.add('nBlades',
                      IndepVarComp('nBlades', nBlades),
                      promotes=['*'])

        prob.setup(check=False)

        prob['blade_mass'] = blade_mass
        prob['blade_moment_of_inertia'] = blade_moment_of_inertia
        prob['tilt'] = tilt
        prob['nBlades'] = nBlades

        check_gradient_unit_test(self, prob)
    def test1(self):

        V = np.array([12.5, 11.5574318317, 10.7470459579, 10.0428591371, 9.42527942463, 8.87925487168, 8.39303048389, 7.95729238704, 7.56456542753, 7.2087807692, 6.88496003209, 6.58898090313, 6.31740071221, 6.06732191135, 5.83628828803, 5.62220402072, 5.42326991915, 5.2379327383])
        T = np.array([297537.442366, 287373.577926, 276842.263638, 266577.02588, 257357.173035, 249612.50174, 243430.855264, 238328.580357, 232897.327461, 226569.543695, 218948.774702, 210325.108191, 201373.59928, 192450.494842, 183749.591171, 175393.691013, 167431.667222, 159881.687873])
        Q = np.array([2771187.76066, 2708873.98497, 2608206.05664, 2489419.14819, 2369374.79424, 2256062.60666, 2150350.91314, 2043415.20025, 1921526.97181, 1784742.05328, 1635134.27376, 1484081.73688, 1340896.38225, 1209094.24861, 1089686.69666, 982501.972978, 886537.720876, 800672.778302])
        P = np.array([1741188.62212, 1702035.72214, 1638784.19732, 1564148.18153, 1488722.08943, 1417525.94222, 1351105.32627, 1283915.63627, 1207331.00366, 1121386.50463, 1027385.16442, 932476.05638, 842510.044742, 759696.321788, 684670.344188, 617324.196089, 557028.078207, 503077.543649])
        R = 62.9400379597
        rho = 1.225

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', Coefficients(len(V)), promotes=['*'])
        prob.root.add('V', IndepVarComp('V', np.zeros(len(V))), promotes=['*'])
        prob.root.add('T', IndepVarComp('T', np.zeros(len(T))), promotes=['*'])
        prob.root.add('Q', IndepVarComp('Q', np.zeros(len(Q))), promotes=['*'])
        prob.root.add('P', IndepVarComp('P', np.zeros(len(P))), promotes=['*'])
        prob.root.add('R', IndepVarComp('R', 0.0), promotes=['*'])
        prob.root.add('rho', IndepVarComp('rho', 0.0), promotes=['*'])
        prob.setup(check=False)

        prob['V'] = V
        prob['T'] = T
        prob['Q'] = Q
        prob['P'] = P
        prob['R'] = R
        prob['rho'] = rho

        check_gradient_unit_test(self, prob)
Пример #5
0
    def test1(self):

        control_tsr = 8.0
        control_pitch = 1.0
        Vrated = 12.0
        R = 63.0
        Vfactor = 0.7

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', SetupPCModVarSpeed(), promotes=['*'])
        prob.root.add('control_tsr',
                      IndepVarComp('control:tsr', control_tsr),
                      promotes=['*'])
        prob.root.add('control_pitch',
                      IndepVarComp('control:pitch', control_pitch),
                      promotes=['*'])
        prob.root.add('Vrated', IndepVarComp('Vrated', Vrated), promotes=['*'])
        prob.root.add('R', IndepVarComp('R', R), promotes=['*'])
        prob.root.add('Vfactor',
                      IndepVarComp('Vfactor', Vfactor),
                      promotes=['*'])

        prob.setup(check=False)

        prob['control:tsr'] = control_tsr
        prob['control:pitch'] = control_pitch
        prob['Vrated'] = Vrated
        prob['R'] = R
        prob['Vfactor'] = Vfactor

        check_gradient_unit_test(self, prob)
    def test1(self):

        control_Vin = 3.0
        control_Vout = 25.0
        control_tsr = 7.55
        control_maxOmega = 12.0
        R = 62.9400379597

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', SetupRunVarSpeed(), promotes=['*'])
        prob.root.add('control_Vin', IndepVarComp('control:Vin', control_Vin), promotes=['*'])
        prob.root.add('control_Vout', IndepVarComp('control:Vout', control_Vout), promotes=['*'])
        prob.root.add('control_tsr', IndepVarComp('control:tsr', control_tsr), promotes=['*'])
        prob.root.add('control_maxOmega', IndepVarComp('control:maxOmega', control_maxOmega), promotes=['*'])
        prob.root.add('R', IndepVarComp('R', 0.0), promotes=['*'])
        prob.root.add('rho', IndepVarComp('rho', 0.0), promotes=['*'])
        prob.setup(check=False)

        prob['control:Vin'] = control_Vin
        prob['control:Vout'] = control_Vout
        prob['control:tsr'] = control_tsr
        prob['control:maxOmega'] = control_maxOmega
        prob['R'] = R

        check_gradient_unit_test(self, prob)
Пример #7
0
    def test1(self):

        rstar = np.array([
            0.0, 0.022, 0.067, 0.111, 0.167, 0.233, 0.3, 0.367, 0.433, 0.5,
            0.567, 0.633, 0.7, 0.767, 0.833, 0.889, 0.933, 0.978
        ])
        Mxb = np.array([
            2374300.0, 2083400.0, 1810800.0, 1570500.0, 1310400.0, 1048800.0,
            823670.0, 634070.0, 477270.0, 348040.0, 244580.0, 163390.0,
            102520.0, 57842.0, 27349.0, 11262.0, 3854.9, 447.38
        ])
        Myb = np.array([
            2773200.0, 2815500.0, 2600400.0, 2393300.0, 2137100.0, 1845900.0,
            1558200.0, 1289600.0, 1042700.0, 820150.0, 624490.0, 452290.0,
            306580.0, 187460.0, 96475.0, 42677.0, 15409.0, 1842.6
        ])
        theta = np.array([
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 12.9342399734, 12.4835173655, 11.4807910924,
            10.9555299481, 10.2141623046, 9.50473135323, 8.7980712345,
            8.12522342051, 6.81383731475, 6.42068577363, 5.58414615907,
            4.96394315694, 4.44088253161, 4.38489418276, 4.35829308634,
            4.33139992746, 3.86272702658, 3.38639207628, 1.57773054352,
            0.953410121155, 0.504987738102, 0.0995174088527, -0.0878099
        ])
        r = np.array([
            1.5375, 1.84056613137, 1.93905987557, 2.03755361977, 2.14220322299,
            2.24069696719, 2.33919071139, 2.90419974, 3.04095863882,
            3.13945238302, 5.637500205, 7.04226699698, 8.370800055,
            11.8494282928, 13.8375, 14.7182548841, 15.887499795, 18.5537233505,
            19.9875, 22.0564071286, 24.087500205, 26.16236509, 28.187499795,
            32.2875, 33.5678634821, 36.387500205, 38.5725768593, 40.487499795,
            40.6967540173, 40.7964789782, 40.8975, 42.6919644014, 44.5875,
            52.787499795, 56.204199945, 58.937499795, 61.67080026, 63.0375
        ])

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', DamageLoads(len(r)), promotes=['*'])
        prob.root.add('rstar', IndepVarComp('rstar', rstar), promotes=['*'])
        prob.root.add('Mxb', IndepVarComp('Mxb', Mxb), promotes=['*'])
        prob.root.add('Myb', IndepVarComp('Myb', Myb), promotes=['*'])
        prob.root.add('theta', IndepVarComp('theta', theta), promotes=['*'])
        prob.root.add('r', IndepVarComp('r', r), promotes=['*'])

        prob.setup(check=False)

        prob['rstar'] = rstar
        prob['Mxb'] = Mxb
        prob['Myb'] = Myb
        prob['theta'] = theta
        prob['r'] = r

        check_gradient_unit_test(self, prob, tol=5e-5)
Пример #8
0
    def test1(self):

        r = np.array([
            1.5375, 1.84056613137, 1.93905987557, 2.03755361977, 2.14220322299,
            2.24069696719, 2.33919071139, 2.90419974, 3.04095863882,
            3.13945238302, 5.637500205, 7.04226699698, 8.370800055,
            11.8494282928, 13.8375, 14.7182548841, 15.887499795, 18.5537233505,
            19.9875, 22.0564071286, 24.087500205, 26.16236509, 28.187499795,
            32.2875, 33.5678634821, 36.387500205, 38.5725768593, 40.487499795,
            40.6967540173, 40.7964789782, 40.8975, 42.6919644014, 44.5875,
            52.787499795, 56.204199945, 58.937499795, 61.67080026, 63.0375
        ])
        precurve = np.array([
            0.0, 0.043324361025, 0.0573893371698, 0.0714469497372,
            0.0863751069858, 0.100417566593, 0.114452695996, 0.194824077331,
            0.214241777459, 0.228217752953, 0.580295739194, 0.776308800624,
            0.960411633829, 1.4368012564, 1.7055214864, 1.823777005,
            1.98003324362, 2.32762426752, 2.50856911855, 2.76432512112,
            3.0113656418, 3.26199245912, 3.50723775206, 4.0150233695,
            4.17901272929, 4.55356019347, 4.85962948702, 5.14086873143,
            5.17214747287, 5.18708601127, 5.20223968442, 5.47491847385,
            5.77007321175, 7.12818875977, 7.7314427824, 8.22913789456,
            8.73985955154, 9.0
        ])
        presweep = np.array([
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
        ])
        precone = 2.5

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', BladeCurvature(len(r)), promotes=['*'])
        prob.root.add('r', IndepVarComp('r', r), promotes=['*'])
        prob.root.add('precurve',
                      IndepVarComp('precurve', precurve),
                      promotes=['*'])
        prob.root.add('presweep',
                      IndepVarComp('presweep', presweep),
                      promotes=['*'])
        prob.root.add('precone',
                      IndepVarComp('precone', precone),
                      promotes=['*'])

        prob.setup(check=False)

        prob['r'] = r
        prob['precurve'] = precurve
        prob['presweep'] = presweep
        prob['precurve'] = precurve
        prob['presweep'] = presweep

        check_gradient_unit_test(self, prob, tol=5e-5)
    def test1(self):
        control_Vin = 3.0
        control_Vout = 25.0
        control_ratedPower = 5e6
        control_tsr = 7.5
        control_pitch = 0.0
        control_maxOmega = 12.0
        Vcoarse = np.array([3.0, 4.15789473684, 5.31578947368, 6.47368421053, 7.63157894737, 8.78947368421, 9.94736842105, 11.1052631579, 12.2631578947, 13.4210526316, 14.5789473684, 15.7368421053, 16.8947368421, 18.0526315789, 19.2105263158, 20.3684210526, 21.5263157895, 22.6842105263, 23.8421052632, 25.0])
        Pcoarse = np.array([22025.3984542, 165773.30206, 416646.421046, 804477.093872, 1359097.659, 2110340.45488, 3088037.81999, 4297554.655, 5634839.03406, 7014620.69097, 8243314.7876, 9151515.42199, 9805082.34125, 10369558.6255, 10906183.6245, 11403861.5527, 11836495.4076, 12179487.9734, 12422864.4516, 12564556.3923])
        Tcoarse = np.array([52447.090344, 100745.549657, 164669.981102, 244220.384676, 339396.760382, 450199.108219, 576627.428186, 690511.171188, 779190.745114, 856112.80582, 912563.587402, 948902.381907, 976338.470922, 1006515.00082, 1040084.63496, 1074759.69165, 1108268.14897, 1138947.1794, 1166201.26418, 1190149.76946])
        Vrated = 12.0
        R = 62.9400379597

        prob = Problem()
        prob.root = Group()
        prob.root.add('powercurve', RegulatedPowerCurveGroup())
        prob.root.add('control_Vin', IndepVarComp('control:Vin', control_Vin), promotes=['*'])
        prob.root.add('control_Vout', IndepVarComp('control:Vout', control_Vout), promotes=['*'])
        prob.root.add('control_ratedPower', IndepVarComp('control:ratedPower', control_ratedPower), promotes=['*'])
        prob.root.add('control_tsr', IndepVarComp('control:tsr', control_tsr), promotes=['*'])
        prob.root.add('control_pitch', IndepVarComp('control:pitch', control_pitch), promotes=['*'])
        prob.root.add('control_maxOmega', IndepVarComp('control:maxOmega', control_maxOmega), promotes=['*'])
        prob.root.add('Vcoarse', IndepVarComp('Vcoarse', np.zeros(len(Vcoarse))), promotes=['*'])
        prob.root.add('Pcoarse', IndepVarComp('Pcoarse', np.zeros(len(Pcoarse))), promotes=['*'])
        prob.root.add('Tcoarse', IndepVarComp('Tcoarse', np.zeros(len(Tcoarse))), promotes=['*'])
        prob.root.add('Vrated', IndepVarComp('Vrated', Vrated))
        prob.root.add('R', IndepVarComp('R', 0.0), promotes=['*'])

        prob.root.connect('control:Vin', 'powercurve.control:Vin')
        prob.root.connect('control:Vout', 'powercurve.control:Vout')
        prob.root.connect('control:maxOmega', 'powercurve.control:maxOmega')
        prob.root.connect('control:pitch', 'powercurve.control:pitch')
        prob.root.connect('control:ratedPower', 'powercurve.control:ratedPower')
        prob.root.connect('control:tsr', 'powercurve.control:tsr')
        prob.root.connect('Vcoarse', 'powercurve.Vcoarse')
        prob.root.connect('Pcoarse', 'powercurve.Pcoarse')
        prob.root.connect('Tcoarse', 'powercurve.Tcoarse')
        prob.root.connect('R', 'powercurve.R')

        prob.setup(check=False)

        prob['control:Vin'] = control_Vin
        prob['control:Vout'] = control_Vout
        prob['control:ratedPower'] = control_ratedPower
        prob['control:tsr'] = control_tsr
        prob['control:pitch'] = control_pitch
        prob['control:maxOmega'] = control_maxOmega
        prob['Vcoarse'] = Vcoarse
        prob['Pcoarse'] = Pcoarse
        prob['Tcoarse'] = Tcoarse
        prob['R'] = R

        check_gradient_unit_test(self, prob, tol=3e-5, display=False, comp=prob.root.powercurve)
Пример #10
0
    def test1(self):

        xbar = 6.0
        x = np.array([3.0, 3.08805770406, 3.17611540812, 3.26417311218, 3.35223081624, 3.4402885203, 3.52834622436, 3.61640392842, 3.70446163248, 3.79251933654, 3.8805770406, 3.96863474466, 4.05669244872, 4.14475015278, 4.23280785684, 4.3208655609, 4.40892326496, 4.49698096902, 4.58503867308, 4.67309637714, 4.7611540812, 4.84921178526, 4.93726948932, 5.02532719338, 5.11338489744, 5.2014426015, 5.28950030556, 5.37755800962, 5.46561571369, 5.55367341775, 5.64173112181, 5.72978882587, 5.81784652993, 5.90590423399, 5.99396193805, 6.08201964211, 6.17007734617, 6.25813505023, 6.34619275429, 6.43425045835, 6.52230816241, 6.61036586647, 6.69842357053, 6.78648127459, 6.87453897865, 6.96259668271, 7.05065438677, 7.13871209083, 7.22676979489, 7.31482749895, 7.40288520301, 7.49094290707, 7.57900061113, 7.66705831519, 7.75511601925, 7.84317372331, 7.93123142737, 8.01928913143, 8.10734683549, 8.19540453955, 8.28346224361, 8.37151994767, 8.45957765173, 8.54763535579, 8.63569305985, 8.72375076391, 8.81180846797, 8.89986617203, 8.98792387609, 9.07598158015, 9.16403928421, 9.25209698827, 9.34015469233, 9.42821239639, 9.51627010045, 9.60432780451, 9.69238550857, 9.78044321263, 9.86850091669, 9.95655862075, 10.0446163248, 10.1326740289, 10.2207317329, 10.308789437, 10.3968471411, 10.4849048451, 10.5729625492, 10.6610202532, 10.7490779573, 10.8371356614, 10.9251933654, 11.0132510695, 11.1013087735, 11.1893664776, 11.2774241817, 11.3654818857, 11.4535395898, 11.5415972938, 11.6296549979, 11.717712702, 11.8505355749, 11.9833584479, 12.1161813209, 12.2490041939, 12.3818270669, 12.5146499398, 12.6474728128, 12.7802956858, 12.9131185588, 13.0459414318, 13.1787643047, 13.3115871777, 13.4444100507, 13.5772329237, 13.7100557967, 13.8428786696, 13.9757015426, 14.1085244156, 14.2413472886, 14.3741701616, 14.5069930345, 14.6398159075, 14.7726387805, 14.9054616535, 15.0382845265, 15.1711073994, 15.3039302724, 15.4367531454, 15.5695760184, 15.7023988914, 15.8352217644, 15.9680446373, 16.1008675103, 16.2336903833, 16.3665132563, 16.4993361293, 16.6321590022, 16.7649818752, 16.8978047482, 17.0306276212, 17.1634504942, 17.2962733671, 17.4290962401, 17.5619191131, 17.6947419861, 17.8275648591, 17.960387732, 18.093210605, 18.226033478, 18.358856351, 18.491679224, 18.6245020969, 18.7573249699, 18.8901478429, 19.0229707159, 19.1557935889, 19.2886164618, 19.4214393348, 19.5542622078, 19.6870850808, 19.8199079538, 19.9527308267, 20.0855536997, 20.2183765727, 20.3511994457, 20.4840223187, 20.6168451916, 20.7496680646, 20.8824909376, 21.0153138106, 21.1481366836, 21.2809595565, 21.4137824295, 21.5466053025, 21.6794281755, 21.8122510485, 21.9450739215, 22.0778967944, 22.2107196674, 22.3435425404, 22.4763654134, 22.6091882864, 22.7420111593, 22.8748340323, 23.0076569053, 23.1404797783, 23.2733026513, 23.4061255242, 23.5389483972, 23.6717712702, 23.8045941432, 23.9374170162, 24.0702398891, 24.2030627621, 24.3358856351, 24.4687085081, 24.6015313811, 24.734354254, 24.867177127, 25.0])

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', RayleighCDF(), promotes=['*'])
        prob.root.add('xbar', IndepVarComp('xbar', 0.0), promotes=['*'])
        prob.root.add('x', IndepVarComp('x', np.zeros(len(x))), promotes=['*'])
        prob.setup(check=False)

        prob['xbar'] = xbar
        prob['x'] = x

        check_gradient_unit_test(self, prob, tol=2e-6)
Пример #11
0
    def test4(self):

        aeroPower = np.linspace(-10.0, 30.0, 50)
        ratedPower = 5.0

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', CSMDrivetrain(len(aeroPower)), promotes=['*'])
        prob.root.add('aeroPower', IndepVarComp('aeroPower', np.zeros(len(aeroPower))), promotes=['*'])
        prob.root.add('ratedPower', IndepVarComp('ratedPower', 0.0), promotes=['*'])
        prob.root.add('drivetrainType', IndepVarComp('drivetrainType', Enum('geared', 'single_stage', 'multi_drive', 'pm_direct_drive'), pass_by_obj=True), promotes=['*'])
        prob.setup(check=False)

        prob['aeroPower'] = aeroPower
        prob['ratedPower'] = ratedPower
        prob['drivetrainType'] = 'geared'

        check_gradient_unit_test(self, prob)
Пример #12
0
    def test1(self):

        aeroPower = np.array([94518.9621316, 251637.667571, 525845.9078, 949750.895039, 1555959.84151, 2377079.95943, 3445718.46102, 4767739.26659, 6246980.6699, 7776655.12685, 9138828.60234, 10145691.7573, 10870259.0229, 11496057.2782, 12090978.6194, 12642721.8686, 13122354.9713, 13502608.5891, 13772424.3097, 13929508.977])
        ratedPower = 5000000.0

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', CSMDrivetrain(len(aeroPower)), promotes=['*'])
        prob.root.add('aeroPower', IndepVarComp('aeroPower', np.zeros(len(aeroPower))), promotes=['*'])
        prob.root.add('ratedPower', IndepVarComp('ratedPower', 0.0), promotes=['*'])
        prob.root.add('drivetrainType', IndepVarComp('drivetrainType', Enum('geared', 'single_stage', 'multi_drive', 'pm_direct_drive'), pass_by_obj=True), promotes=['*'])
        prob.setup(check=False)

        prob['aeroPower'] = aeroPower
        prob['ratedPower'] = ratedPower
        prob['drivetrainType'] = 'geared'

        check_gradient_unit_test(self, prob, tol=6e-4)
Пример #13
0
    def test1(self):

        dx = 4.27242809591
        dy = -0.371550675139
        dz = 0.0400553989266
        theta = -0.0878099
        pitch = 0.0
        azimuth = 180.0
        tilt = 5.0
        precone = 2.5
        dynamicFactor = 1.2

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', TipDeflection(), promotes=['*'])
        prob.root.add('dx', IndepVarComp('dx', dx), promotes=['*'])
        prob.root.add('dy', IndepVarComp('dy', dy), promotes=['*'])
        prob.root.add('dz', IndepVarComp('dz', dz), promotes=['*'])
        prob.root.add('theta', IndepVarComp('theta', theta), promotes=['*'])
        prob.root.add('pitch', IndepVarComp('pitch', pitch), promotes=['*'])
        prob.root.add('azimuth',
                      IndepVarComp('azimuth', azimuth),
                      promotes=['*'])
        prob.root.add('tilt', IndepVarComp('tilt', tilt), promotes=['*'])
        prob.root.add('totalConeTip',
                      IndepVarComp('totalConeTip', precone),
                      promotes=['*'])
        prob.root.add('dynamicFactor',
                      IndepVarComp('dynamicFactor', dynamicFactor),
                      promotes=['*'])

        prob.setup(check=False)

        prob['dx'] = dx
        prob['dy'] = dy
        prob['dz'] = dz
        prob['theta'] = theta
        prob['pitch'] = pitch
        prob['azimuth'] = azimuth
        prob['tilt'] = tilt
        prob['totalConeTip'] = precone
        prob['dynamicFactor'] = dynamicFactor

        check_gradient_unit_test(self, prob)
Пример #14
0
    def test1(self):

        Rtip = 63.0
        precone = 5.0
        precurveTip = 0.0

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', CCBladeGeometry(), promotes=['*'])
        prob.root.add('Rtip', IndepVarComp('Rtip', 0.0), promotes=['*'])
        prob.root.add('precone', IndepVarComp('precone', 0.0), promotes=['*'])
        prob.root.add('precurveTip', IndepVarComp('precurveTip', 0.0), promotes=['*'])
        prob.setup(check=False)

        prob['Rtip'] = Rtip
        prob['precone'] = precone
        prob['precurveTip'] = precurveTip

        check_gradient_unit_test(self, prob)
Пример #15
0
    def test1(self):

        CDF_V = np.array([0.178275041966, 0.190296788962, 0.202568028297, 0.215071993446, 0.227791807017, 0.240710518196, 0.253811139789, 0.267076684744, 0.280490202059, 0.294034811963, 0.307693740274, 0.32145035184, 0.335288182978, 0.349190972822, 0.363142693506, 0.377127579106, 0.391130153286, 0.405135255571, 0.419128066214, 0.43309412959, 0.447019376098, 0.460890142513, 0.474693190784, 0.488415725243, 0.502045408211, 0.515570374001, 0.528979241305, 0.54226112398, 0.555405640233, 0.568402920224, 0.581243612108, 0.593918886545, 0.606420439704, 0.618740494789, 0.630871802149, 0.642807637993, 0.654541801767, 0.666068612246, 0.67738290239, 0.68848001302, 0.699355785386, 0.710006552662, 0.720429130464, 0.730620806428, 0.740579328925, 0.750302894983, 0.759790137479, 0.76904011166, 0.778052281079, 0.786826502994, 0.795363013307, 0.803662411103, 0.811725642861, 0.819553986387, 0.827149034543, 0.834512678823, 0.841647092838, 0.848554715765, 0.855238235811, 0.861700573747, 0.867944866556, 0.873974451244, 0.879792848857, 0.885403748745, 0.890810993109, 0.896018561866, 0.90103055787, 0.90585119251, 0.91048477172, 0.914935682413, 0.919208379383, 0.923307372661, 0.927237215373, 0.931002492094, 0.934607807711, 0.93805777681, 0.941357013592, 0.944510122313, 0.947521688261, 0.950396269264, 0.95313838773, 0.955752523204, 0.95824310546, 0.960614508091, 0.962871042612, 0.965016953057, 0.967056411054, 0.968993511377, 0.970832267946, 0.972576610282, 0.974230380379, 0.975797329995, 0.977281118336, 0.978685310119, 0.980013374, 0.981268681344, 0.982454505324, 0.98357402033, 0.984630301666, 0.985626325531, 0.986564969246, 0.987449011729, 0.988281134189, 0.98906392103, 0.989799860938, 0.990491348148, 0.991140683869, 0.991750077849, 0.992321650072, 0.992857432566, 0.993359371317, 0.99382932827, 0.994269083401, 0.994680336859, 0.995064711163, 0.995423753433, 0.995758937661, 0.996071667003, 0.996363276084, 0.996635033314, 0.996888143197, 0.997123748634, 0.997342933215, 0.997546723483, 0.997736091178, 0.997911955448, 0.998075185027, 0.998226600365, 0.998366975728, 0.998497041241, 0.998617484891, 0.99872895447, 0.998832059475, 0.998927372946, 0.999015433252, 0.999096745819, 0.999171784802, 0.999240994698, 0.999304791902, 0.999363566204, 0.999417682229, 0.999467480822, 0.999513280372, 0.999555378083, 0.999594051191, 0.999629558123, 0.999662139611, 0.999692019741, 0.999719406969, 0.999744495073, 0.999767464065, 0.999788481055, 0.99980770107, 0.999825267834, 0.999841314496, 0.999855964334, 0.999869331401, 0.999881521151, 0.999892631024, 0.999902750988, 0.999911964064, 0.999920346811, 0.999927969778, 0.99993489794, 0.999941191092, 0.999946904234, 0.999952087915, 0.999956788569, 0.99996104882, 0.999964907768, 0.99996840126, 0.999971562138, 0.999974420473, 0.999977003779, 0.999979337216, 0.999981443776, 0.999983344458, 0.999985058426, 0.999986603162, 0.999987994599, 0.999989247253, 0.999990374339, 0.999991387879, 0.999992298805, 0.999993117053, 0.999993851641, 0.999994510758, 0.999995101829, 0.999995631585, 0.999996106123, 0.999996530963, 0.999996911098, 0.999997251045, 0.999997554883, 0.999997826298, 0.999998068616, 0.999998284835, 0.999998477661, 0.999998649529, 0.999998802632])
        P = np.array([22025.3984542, 31942.1185436, 42589.4002304, 53993.2085473, 66179.5085267, 79174.2652013, 93003.4436034, 107693.008766, 123268.925721, 139757.159501, 157183.67514, 175574.437668, 194955.41212, 215352.563527, 236791.856922, 259299.257337, 282900.729806, 307622.23936, 333489.751032, 360529.229855, 388766.640862, 418227.949084, 448939.119554, 480926.117306, 514214.907371, 548831.454781, 584801.724571, 622151.681771, 660907.291415, 701094.518535, 742739.328164, 785867.685334, 830505.555078, 876678.902429, 924413.692418, 973735.890078, 1024671.46044, 1077246.36854, 1131486.57941, 1187418.05809, 1245066.76959, 1304458.67896, 1365619.75124, 1428575.95144, 1493353.24461, 1559977.59577, 1628474.96996, 1698871.33222, 1771192.64757, 1845464.88105, 1921713.99769, 1999965.96251, 2080246.74057, 2162582.29688, 2246998.59648, 2333521.6044, 2422177.28568, 2512991.60535, 2605990.52843, 2701200.01997, 2798646.04499, 2898354.56853, 3000351.55562, 3104662.97129, 3211314.78058, 3320332.94852, 3431743.44013, 3545572.22046, 3661284.29229, 3777883.06101, 3895967.17288, 4015492.83297, 4136416.74759, 4258697.48598, 4382294.05017, 4507165.36302, 4631531.67845, 4757024.71876, 4883638.63072, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0, 5000000.0])
        lossFactor = 0.95

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', AEP(), promotes=['*'])
        prob.root.add('CDF_V', IndepVarComp('CDF_V', np.zeros(len(CDF_V))), promotes=['*'])
        prob.root.add('P', IndepVarComp('P', np.zeros(len(P))), promotes=['*'])
        prob.root.add('lossFactor', IndepVarComp('lossFactor', 0.0), promotes=['*'])
        prob.setup(check=False)

        prob['CDF_V'] = CDF_V
        prob['P'] = P
        prob['lossFactor'] = lossFactor

        check_gradient_unit_test(self, prob, step_size=1)  # larger step size b.c. AEP is big value
Пример #16
0
    def test1(self):

        r_aero = np.array([
            0.02222276, 0.06666667, 0.11111057, 0.2, 0.23333333, 0.3,
            0.36666667, 0.43333333, 0.5, 0.56666667, 0.63333333, 0.64, 0.7,
            0.83333333, 0.88888943, 0.93333333, 0.97777724
        ])
        fraction = np.array([
            0.0, 0.221750339522, 0.293817188822, 0.365884038121,
            0.442455065507, 0.514521914807, 0.586588764105, 1.0,
            0.050034345133, 0.0860690751106, 1.0, 0.513945366068, 1.0,
            0.636330560083, 1.0, 0.429636571789, 1.0, 0.65029839566, 1.0,
            0.504611469554, 1.0, 0.506064656711, 1.0, 1.0, 0.312283760506, 1.0,
            0.532945578735, 1.0, 0.510375896771, 0.75360738708, 1.0,
            0.486304715835, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
        ])
        idxj = np.array([
            0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7,
            7, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 13, 14, 15, 16, 17
        ])

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp',
                      RGrid(len(r_aero), len(fraction)),
                      promotes=['*'])
        prob.root.add('r_aero',
                      IndepVarComp('r_aero', np.zeros(len(r_aero))),
                      promotes=['*'])
        prob.root.add('fraction',
                      IndepVarComp('fraction', np.zeros(len(fraction))),
                      promotes=['*'])
        prob.root.add('idxj',
                      IndepVarComp('idxj', np.zeros(len(idxj))),
                      promotes=['*'])
        prob.setup(check=False)

        prob['r_aero'] = r_aero
        prob['fraction'] = fraction
        prob['idxj'] = idxj

        check_gradient_unit_test(self, prob)
Пример #17
0
    def test1(self):

        xbar = 8.0
        k = 2.2
        x = np.linspace(1.0, 15.0, 50)
        n = len(x)

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', WeibullWithMeanCDF(n), promotes=['*'])
        prob.root.add('xbar', IndepVarComp('xbar', xbar), promotes=['*'])
        prob.root.add('k', IndepVarComp('k', k), promotes=['*'])
        prob.root.add('x', IndepVarComp('x', x), promotes=['*'])
        prob.setup(check=False)

        prob['xbar'] = xbar
        prob['k'] = k
        prob['x'] = x

        check_gradient_unit_test(self, prob)
Пример #18
0
    def test1(self):

        T = np.array([2414072.40260361, 188461.59444074])
        Q = np.array([10926313.24295958, -8041330.51312603])
        nBlades = 3

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', ExtremeLoads(), promotes=['*'])
        prob.root.add('T', IndepVarComp('T', T), promotes=['*'])
        prob.root.add('Q', IndepVarComp('Q', Q), promotes=['*'])
        prob.root.add('nBlades',
                      IndepVarComp('nBlades', nBlades),
                      promotes=['*'])

        prob.setup(check=False)

        prob['T'] = T
        prob['Q'] = Q
        prob['nBlades'] = nBlades

        check_gradient_unit_test(self, prob, tol=1.5e-4)
Пример #19
0
    def test1(self):

        # adding offset to try to avoid linear interpolation issue
        r_str = 0.1 + np.array([
            1.575, 1.87769653853, 1.9760701684, 2.0744437988, 2.17896578003,
            2.27733940991, 2.37571303979, 2.940033033, 3.07662515267,
            3.17499878255, 5.67000020475, 7.0730538665, 8.39996676225,
            11.8743527705, 13.86, 14.7396807928, 15.9074997953, 18.5704718586,
            20.0025, 22.0688840711, 24.0975002047, 26.1698347667,
            28.1924997953, 32.2875, 33.5663020632, 36.3825002048,
            38.5649121314, 40.4774997953, 40.6864988295, 40.7861021746, 40.887,
            42.6792760302, 44.5725, 52.7624997953, 56.1750332378,
            58.9049997952, 61.634966967, 63.0
        ])
        aeroLoads_r = np.array([
            1.575, 2.940033033, 5.67000020475, 8.39996676225, 13.86,
            15.9074997953, 20.0025, 24.0975002047, 28.1924997953, 32.2875,
            36.3825002048, 40.4774997953, 40.887, 44.5725, 52.7624997953,
            56.1750332378, 58.9049997952, 61.634966967, 63.0
        ])
        aeroLoads_Px = np.array([
            0.0, 394.495335464, 488.816521749, 403.91526216, 3498.00637403,
            3269.97046313, 4043.59672475, 4501.44255062, 5033.93200097,
            5718.97291507, 6320.75067512, 7109.17757276, 8059.89616754,
            8525.76224891, 8922.31561839, 8701.63574206, 8270.06152072,
            7295.11706029, 0.0
        ])
        aeroLoads_Py = np.array([
            -0, 70.1691953218, 168.88301855, 208.278564575, -1235.05334966,
            -1093.35619071, -1356.19151969, -1524.64653804, -1637.39245978,
            -1682.20028084, -1815.96503432, -1854.41936505, -2010.09761627,
            -1958.48701857, -1702.10190133, -1523.95755076, -1325.12331629,
            -935.412289309, -0
        ])
        aeroLoads_Pz = np.array([
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0
        ])
        totalCone = np.array([
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5,
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5,
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5
        ])
        x_az = np.array([
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
        ])
        y_az = np.array([
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
        ])
        z_az = np.array([
            1.5375, 1.84056613137, 1.93905987557, 2.03755361977, 2.14220322299,
            2.24069696719, 2.33919071139, 2.90419974, 3.04095863882,
            3.13945238302, 5.637500205, 7.04226699698, 8.370800055,
            11.8494282928, 13.8375, 14.7182548841, 15.887499795, 18.5537233505,
            19.9875, 22.0564071286, 24.087500205, 26.16236509, 28.187499795,
            32.2875, 33.5678634821, 36.387500205, 38.5725768593, 40.487499795,
            40.6967540173, 40.7964789782, 40.8975, 42.6919644014, 44.5875,
            52.787499795, 56.204199945, 58.937499795, 61.67080026, 63.0375
        ])
        s = np.array([
            1.5375, 1.84056613137, 1.93905987557, 2.03755361977, 2.14220322299,
            2.24069696719, 2.33919071139, 2.90419974, 3.04095863882,
            3.13945238302, 5.637500205, 7.04226699698, 8.370800055,
            11.8494282928, 13.8375, 14.7182548841, 15.887499795, 18.5537233505,
            19.9875, 22.0564071286, 24.087500205, 26.16236509, 28.187499795,
            32.2875, 33.5678634821, 36.387500205, 38.5725768593, 40.487499795,
            40.6967540173, 40.7964789782, 40.8975, 42.6919644014, 44.5875,
            52.787499795, 56.204199945, 58.937499795, 61.67080026, 63.0375
        ])

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', RootMoment(len(r_str)), promotes=['*'])
        prob.root.add('r_str',
                      IndepVarComp('r_str', np.zeros(len(r_str))),
                      promotes=['*'])
        prob.root.add('aeroLoads_r',
                      IndepVarComp('aeroLoads:r', np.zeros(len(aeroLoads_r))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Px',
                      IndepVarComp('aeroLoads:Px',
                                   np.zeros(len(aeroLoads_Px))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Py',
                      IndepVarComp('aeroLoads:Py',
                                   np.zeros(len(aeroLoads_Py))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Pz',
                      IndepVarComp('aeroLoads:Pz',
                                   np.zeros(len(aeroLoads_Pz))),
                      promotes=['*'])
        prob.root.add('totalCone',
                      IndepVarComp('totalCone', np.zeros(len(totalCone))),
                      promotes=['*'])
        prob.root.add('x_az',
                      IndepVarComp('x_az', np.zeros(len(x_az))),
                      promotes=['*'])
        prob.root.add('y_az',
                      IndepVarComp('y_az', np.zeros(len(y_az))),
                      promotes=['*'])
        prob.root.add('z_az',
                      IndepVarComp('z_az', np.zeros(len(z_az))),
                      promotes=['*'])
        prob.root.add('s', IndepVarComp('s', np.zeros(len(s))), promotes=['*'])

        prob.setup(check=False)

        prob['r_str'] = r_str
        prob['aeroLoads:r'] = aeroLoads_r
        prob['aeroLoads:Px'] = aeroLoads_Px
        prob['aeroLoads:Py'] = aeroLoads_Py
        prob['aeroLoads:Pz'] = aeroLoads_Pz
        prob['totalCone'] = totalCone
        prob['x_az'] = x_az
        prob['y_az'] = y_az
        prob['z_az'] = z_az
        prob['s'] = s

        check_gradient_unit_test(self, prob, tol=1e-1, display=False)
Пример #20
0
    def test2(self):

        r = np.array([2.8667, 5.6000, 8.3333, 11.7500, 15.8500, 19.9500, 24.0500,
                  28.1500, 32.2500, 36.3500, 40.4500, 44.5500, 48.6500, 52.7500,
                  56.1667, 58.9000, 61.6333])
        chord = np.array([3.542, 3.854, 4.167, 4.557, 4.652, 4.458, 4.249, 4.007, 3.748,
                      3.502, 3.256, 3.010, 2.764, 2.518, 2.313, 2.086, 1.419])
        theta = np.array([13.308, 13.308, 13.308, 13.308, 11.480, 10.162, 9.011, 7.795,
                      6.544, 5.361, 4.188, 3.125, 2.319, 1.526, 0.863, 0.370, 0.106])
        Rhub = 1.5
        Rtip = 63.0
        hubHt = 80.0
        precone = 2.5
        tilt = -5.0
        yaw = 0.0
        B = 3
        rho = 1.225
        mu = 1.81206e-5
        shearExp = 0.2
        nSector = 4
        precurve = np.zeros(len(r))

        # airfoils
        basepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), '5MW_AFFiles/')

        # load all airfoils
        airfoil_types = [0]*8
        airfoil_types[0] = basepath + 'Cylinder1.dat'
        airfoil_types[1] = basepath + 'Cylinder2.dat'
        airfoil_types[2] = basepath + 'DU40_A17.dat'
        airfoil_types[3] = basepath + 'DU35_A17.dat'
        airfoil_types[4] = basepath + 'DU30_A17.dat'
        airfoil_types[5] = basepath + 'DU25_A17.dat'
        airfoil_types[6] = basepath + 'DU21_A17.dat'
        airfoil_types[7] = basepath + 'NACA64_A17.dat'

        # place at appropriate radial stations
        af_idx = [0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7]

        n = len(r)
        af = [0]*n
        for i in range(n):
            af[i] = airfoil_types[af_idx[i]]

        airfoil_files = np.array(af)

        run_case = 'loads'
        V_load = 12.0
        Omega_load = 10.0
        pitch_load = 0.0
        azimuth_load = 180.0
        n2 = 1

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', CCBlade(run_case, n, n2), promotes=['*'])
        prob.root.add('r', IndepVarComp('r', np.zeros(len(r))), promotes=['*'])
        prob.root.add('chord', IndepVarComp('chord', np.zeros(len(chord))), promotes=['*'])
        prob.root.add('theta', IndepVarComp('theta', np.zeros(len(theta))), promotes=['*'])
        prob.root.add('Rhub', IndepVarComp('Rhub', 0.0), promotes=['*'])
        prob.root.add('Rtip', IndepVarComp('Rtip', 0.0), promotes=['*'])
        prob.root.add('hubHt', IndepVarComp('hubHt', 0.0), promotes=['*'])
        prob.root.add('precone', IndepVarComp('precone', 0.0), promotes=['*'])
        prob.root.add('tilt', IndepVarComp('tilt', 0.0), promotes=['*'])
        prob.root.add('yaw', IndepVarComp('yaw', 0.0), promotes=['*'])
        prob.root.add('B', IndepVarComp('B', 0), promotes=['*'])
        prob.root.add('rho', IndepVarComp('rho', 0.0), promotes=['*'])
        prob.root.add('mu', IndepVarComp('mu', 0.0), promotes=['*'])
        prob.root.add('shearExp', IndepVarComp('shearExp', 0.0, pass_by_obj=True), promotes=['*'])
        prob.root.add('precurve', IndepVarComp('precurve', precurve), promotes=['*'])
        prob.root.add('nSector', IndepVarComp('nSector', nSector), promotes=['*'])
        prob.root.add('airfoil_files', IndepVarComp('airfoil_files', airfoil_files), promotes=['*'])
        prob.root.add('V_load', IndepVarComp('V_load', 0.0), promotes=['*'])
        prob.root.add('Omega_load', IndepVarComp('Omega_load', 0.0), promotes=['*'])
        prob.root.add('pitch_load', IndepVarComp('pitch_load', 0.0), promotes=['*'])
        prob.root.add('azimuth_load', IndepVarComp('azimuth_load', 0.0), promotes=['*'])
        prob.setup(check=False)

        prob['r'] = r
        prob['chord'] = chord
        prob['theta'] = theta
        prob['Rhub'] = Rhub
        prob['Rtip'] = Rtip
        prob['hubHt'] = hubHt
        prob['precone'] = precone
        prob['tilt'] = tilt
        prob['yaw'] = yaw
        prob['B'] = B
        prob['rho'] = rho
        prob['mu'] = mu
        prob['shearExp'] = shearExp
        prob['nSector'] = nSector
        prob['airfoil_files'] = airfoil_files
        prob['V_load'] = V_load
        prob['Omega_load'] = Omega_load
        prob['pitch_load'] = pitch_load
        prob['azimuth_load'] = azimuth_load
        prob['precurve'] = precurve

        check_gradient_unit_test(self, prob, tol=1e-3, display=True)
Пример #21
0
    def test1(self):

        r = np.array([2.8667, 5.6000, 8.3333, 11.7500, 15.8500, 19.9500, 24.0500,
                  28.1500, 32.2500, 36.3500, 40.4500, 44.5500, 48.6500, 52.7500,
                  56.1667, 58.9000, 61.6333])
        chord = np.array([3.542, 3.854, 4.167, 4.557, 4.652, 4.458, 4.249, 4.007, 3.748,
                      3.502, 3.256, 3.010, 2.764, 2.518, 2.313, 2.086, 1.419])
        theta = np.array([13.308, 13.308, 13.308, 13.308, 11.480, 10.162, 9.011, 7.795,
                      6.544, 5.361, 4.188, 3.125, 2.319, 1.526, 0.863, 0.370, 0.106])
        Rhub = 1.5
        Rtip = 63.0
        hubHt = 80.0
        precone = 2.5
        tilt = -5.0
        yaw = 0.0
        B = 3
        rho = 1.225
        mu = 1.81206e-5
        shearExp = 0.2
        nSector = 4
        precurve = np.zeros(len(r))
        precurveTip = 0.0

        # airfoils
        basepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), '5MW_AFFiles/')

        # load all airfoils
        airfoil_types = [0]*8
        airfoil_types[0] = basepath + 'Cylinder1.dat'
        airfoil_types[1] = basepath + 'Cylinder2.dat'
        airfoil_types[2] = basepath + 'DU40_A17.dat'
        airfoil_types[3] = basepath + 'DU35_A17.dat'
        airfoil_types[4] = basepath + 'DU30_A17.dat'
        airfoil_types[5] = basepath + 'DU25_A17.dat'
        airfoil_types[6] = basepath + 'DU21_A17.dat'
        airfoil_types[7] = basepath + 'NACA64_A17.dat'

        # place at appropriate radial stations
        af_idx = [0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7]

        n = len(r)
        af = [0]*n
        for i in range(n):
            af[i] = airfoil_types[af_idx[i]]

        airfoil_files = np.array(af)

        run_case = 'power'
        Uhub = np.array([3.0, 4.15789473684, 5.31578947368, 6.47368421053, 7.63157894737, 8.78947368421, 9.94736842105, 11.1052631579, 12.2631578947, 13.4210526316, 14.5789473684, 15.7368421053, 16.8947368421, 18.0526315789, 19.2105263158, 20.3684210526, 21.5263157895, 22.6842105263, 23.8421052632, 25.0])
        Omega = np.array([3.43647024491, 4.76282718154, 6.08918411817, 7.41554105481, 8.74189799144, 10.0682549281, 11.3946118647, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0])
        pitch = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
        n2 = len(Uhub)

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', CCBlade(run_case, n, n2), promotes=['*'])
        prob.root.add('r', IndepVarComp('r', np.zeros(len(r))), promotes=['*'])
        prob.root.add('chord', IndepVarComp('chord', np.zeros(len(chord))), promotes=['*'])
        prob.root.add('theta', IndepVarComp('theta', np.zeros(len(theta))), promotes=['*'])
        prob.root.add('Rhub', IndepVarComp('Rhub', 0.0), promotes=['*'])
        prob.root.add('Rtip', IndepVarComp('Rtip', 0.0), promotes=['*'])
        prob.root.add('hubHt', IndepVarComp('hubHt', 0.0), promotes=['*'])
        prob.root.add('precone', IndepVarComp('precone', 0.0), promotes=['*'])
        prob.root.add('precurve', IndepVarComp('precurve', precurve), promotes=['*'])
        prob.root.add('precurveTip', IndepVarComp('precurveTip', 0.0), promotes=['*'])
        prob.root.add('tilt', IndepVarComp('tilt', 0.0), promotes=['*'])
        prob.root.add('yaw', IndepVarComp('yaw', 0.0), promotes=['*'])
        prob.root.add('B', IndepVarComp('B', 0), promotes=['*'])
        prob.root.add('rho', IndepVarComp('rho', 0.0), promotes=['*'])
        prob.root.add('mu', IndepVarComp('mu', 0.0), promotes=['*'])
        prob.root.add('shearExp', IndepVarComp('shearExp', 0.0, pass_by_obj=True), promotes=['*'])
        prob.root.add('nSector', IndepVarComp('nSector', nSector), promotes=['*'])
        prob.root.add('airfoil_files', IndepVarComp('airfoil_files', airfoil_files), promotes=['*'])
        prob.root.add('Uhub', IndepVarComp('Uhub', np.zeros(len(Uhub))), promotes=['*'])
        prob.root.add('Omega', IndepVarComp('Omega', np.zeros(len(Omega))), promotes=['*'])
        prob.root.add('pitch', IndepVarComp('pitch', np.zeros(len(pitch))), promotes=['*'])
        prob.setup(check=False)

        prob['r'] = r
        prob['chord'] = chord
        prob['theta'] = theta
        prob['Rhub'] = Rhub
        prob['Rtip'] = Rtip
        prob['hubHt'] = hubHt
        prob['precone'] = precone
        prob['tilt'] = tilt
        prob['yaw'] = yaw
        prob['B'] = B
        prob['rho'] = rho
        prob['mu'] = mu
        prob['shearExp'] = shearExp
        prob['nSector'] = nSector
        prob['airfoil_files'] = airfoil_files
        prob['Uhub'] = Uhub
        prob['Omega'] = Omega
        prob['pitch'] = pitch
        prob['precurve'] = precurve
        prob['precurveTip'] = precurveTip

        check_gradient_unit_test(self, prob, tol=1e-3, display=True)
Пример #22
0
    def test2(self):

        aeroLoads_r = np.array([
            1.575, 2.940033033, 5.67000020475, 8.39996676225, 13.86,
            15.9074997953, 20.0025, 24.0975002047, 28.1924997953, 32.2875,
            36.3825002048, 40.4774997953, 40.887, 44.5725, 52.7624997953,
            56.1750332378, 58.9049997952, 61.634966967, 63.0
        ])
        aeroLoads_Px = np.array([
            0.0, 5284.01751742, 5957.44357892, 4576.24416488, 24983.1752719,
            23185.4068553, 22772.6584971, 20742.2633915, 19438.9406889,
            18477.9925607, 17798.8416165, 16587.2148132, 16307.1178682,
            15198.3868957, 12397.4212608, 11065.3344497, 9918.01519381,
            8690.90719256, 0.0
        ])
        aeroLoads_Py = np.array([
            -0, 3.23552756967e-13, 3.64788210501e-13, 2.80214138432e-13,
            -8241.69218443, -6959.18655392, -6216.4717769, -5238.79147412,
            -3965.60018365, -3301.4647433, -2434.41539477, -1921.45833684,
            -1784.90503315, -1413.83527174, -766.483242904, -565.612693573,
            -430.805328036, -317.225077607, -0
        ])
        aeroLoads_Pz = np.array([
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0
        ])
        aeroLoads_Omega = 0.0
        aeroLoads_pitch = 0.0
        aeroLoads_azimuth = 0.0
        r = np.array([
            1.575, 1.87769653853, 1.9760701684, 2.07444379828, 2.17896578003,
            2.27733940991, 2.37571303979, 2.940033033, 3.07662515267,
            3.17499878255, 5.67000020475, 7.0730538665, 8.39996676225,
            11.8743527705, 13.86, 14.7396807928, 15.9074997953, 18.5704718586,
            20.0025, 22.0688840711, 24.0975002047, 26.1698347667,
            28.1924997953, 32.2875, 33.5663020632, 36.3825002048,
            38.5649121314, 40.4774997953, 40.6864988295, 40.7861021746, 40.887,
            42.6792760302, 44.5725, 52.7624997953, 56.1750332378,
            58.9049997952, 61.634966967, 63.0
        ])
        theta = np.array([
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 12.9342402117, 12.4835185594, 11.4807962375,
            10.9555376235, 10.2141732458, 9.50474414552, 8.79808349002,
            8.12523177814, 6.8138304713, 6.42067815056, 5.58414310075,
            4.96394649167, 4.44089107951, 4.38490319227, 4.35830230526,
            4.3314093512, 3.86273855446, 3.38640148153, 1.57771432025,
            0.953398905137, 0.504982546655, 0.0995167038088, -0.0878099
        ])
        tilt = 5.0
        rhoA = np.array([
            1086.31387923, 1102.59977206, 1120.90516514, 1126.20434689,
            1131.813843, 1137.07339365, 1086.16660785, 882.217532971,
            894.901622709, 899.719853943, 731.023082747, 608.342843886,
            542.222718332, 341.332102119, 336.952507859, 333.167490612,
            330.70966121, 326.000136659, 323.264256247, 317.941928823,
            310.869166296, 273.899186484, 262.928994775, 245.05275646,
            236.749218603, 217.487633686, 205.107910133, 194.259756942,
            167.463953528, 166.764129206, 165.810677408, 155.69651911,
            146.647497247, 100.919341248, 82.5679535343, 67.796593467,
            46.2981454714, 31.2090805766
        ])
        totalCone = np.array([
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5,
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5,
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5
        ])
        z_az = np.array([
            1.5375, 1.84056613137, 1.93905987557, 2.03755361977, 2.14220322299,
            2.24069696719, 2.33919071139, 2.90419974, 3.04095863882,
            3.13945238302, 5.637500205, 7.04226699698, 8.370800055,
            11.8494282928, 13.8375, 14.7182548841, 15.887499795, 18.5537233505,
            19.9875, 22.0564071286, 24.087500205, 26.16236509, 28.187499795,
            32.2875, 33.5678634821, 36.387500205, 38.5725768593, 40.487499795,
            40.6967540173, 40.7964789782, 40.8975, 42.6919644014, 44.5875,
            52.787499795, 56.204199945, 58.937499795, 61.67080026, 63.0375
        ])

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', TotalLoads(len(r)), promotes=['*'])
        prob.root.add('aeroLoads_r',
                      IndepVarComp('aeroLoads:r', np.zeros(len(aeroLoads_r))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Px',
                      IndepVarComp('aeroLoads:Px',
                                   np.zeros(len(aeroLoads_Px))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Py',
                      IndepVarComp('aeroLoads:Py',
                                   np.zeros(len(aeroLoads_Py))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Pz',
                      IndepVarComp('aeroLoads:Pz',
                                   np.zeros(len(aeroLoads_Pz))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Omega',
                      IndepVarComp('aeroLoads:Omega', aeroLoads_Omega),
                      promotes=['*'])
        prob.root.add('aeroLoads_pitch',
                      IndepVarComp('aeroLoads:pitch', aeroLoads_pitch),
                      promotes=['*'])
        prob.root.add('aeroLoads_azimuth',
                      IndepVarComp('aeroLoads:azimuth', aeroLoads_azimuth),
                      promotes=['*'])
        prob.root.add('r', IndepVarComp('r', np.zeros(len(r))), promotes=['*'])
        prob.root.add('theta',
                      IndepVarComp('theta', np.zeros(len(theta))),
                      promotes=['*'])
        prob.root.add('tilt', IndepVarComp('tilt', tilt), promotes=['*'])
        prob.root.add('rhoA',
                      IndepVarComp('rhoA', np.zeros(len(rhoA))),
                      promotes=['*'])
        prob.root.add('totalCone',
                      IndepVarComp('totalCone', np.zeros(len(totalCone))),
                      promotes=['*'])
        prob.root.add('z_az',
                      IndepVarComp('z_az', np.zeros(len(z_az))),
                      promotes=['*'])
        prob.setup(check=False)

        prob['aeroLoads:r'] = aeroLoads_r
        prob['aeroLoads:Px'] = aeroLoads_Px
        prob['aeroLoads:Py'] = aeroLoads_Py
        prob['aeroLoads:Pz'] = aeroLoads_Pz
        prob['aeroLoads:Omega'] = aeroLoads_Omega
        prob['aeroLoads:pitch'] = aeroLoads_pitch
        prob['aeroLoads:azimuth'] = aeroLoads_azimuth
        prob['r'] = r
        prob['theta'] = theta
        prob['tilt'] = tilt
        prob['rhoA'] = rhoA
        prob['totalCone'] = totalCone
        prob['z_az'] = z_az

        check_gradient_unit_test(
            self, prob, tol=0.02
        )  # a couple with more significant errors, but I think these are correct and that the finite differencing is just poor.
Пример #23
0
    def test1(self):

        dx = np.array([
            0.0, 1.39292987639e-05, 2.42964362361e-05, 3.73611415086e-05,
            5.41276445811e-05, 7.25773833888e-05, 9.35928069108e-05,
            0.000268596883961, 0.000326596195925, 0.000372259193056,
            0.00253285667923, 0.00455502505195, 0.00706548815047,
            0.017530829505, 0.0272151750396, 0.0326222002275, 0.0410034329532,
            0.0655343595834, 0.0818962168404, 0.109404026845, 0.140873579829,
            0.177728457961, 0.218834564559, 0.318921553007, 0.354759106888,
            0.442199496033, 0.51925808593, 0.593774567144, 0.602307030873,
            0.606403310701, 0.610574803156, 0.688594372351, 0.779039709944,
            1.2575016857, 1.49348304065, 1.69400834707, 1.90049599542,
            2.00437890947
        ])
        dy = np.array([
            0.0, -9.11673273998e-07, -1.59100573731e-06, -2.44958708331e-06,
            -3.55417484862e-06, -4.77185559999e-06, -6.16078184177e-06,
            -1.77741315033e-05, -2.16387627714e-05, -2.46907649535e-05,
            -0.000177142122562, -0.00032886393339, -0.000523351402122,
            -0.00136667950935, -0.00215626107629, -0.00258384925494,
            -0.00322230578732, -0.00497009730837, -0.00607094164543,
            -0.00784913963514, -0.00980572470543, -0.0120149227037,
            -0.0143773305481, -0.0197932419212, -0.0216584171821,
            -0.0260612290834, -0.0297556792352, -0.0331954636074,
            -0.0335827012855, -0.0337680683508, -0.0339563913295,
            -0.0373950218981, -0.0412189884014, -0.0597108654077,
            -0.0681209435104, -0.0750137913709, -0.0819682184214,
            -0.085450339495
        ])
        dz = np.array([
            0.0, 0.000190681386865, 0.000249594803444, 0.000305808888278,
            0.000363037181592, 0.000414559803159, 0.000465006717172,
            0.00079021115147, 0.000878140045153, 0.000937905765842,
            0.00236994444878, 0.003141201122, 0.00385188728597,
            0.0059090995974, 0.00721749042255, 0.00775193614485,
            0.00838246793108, 0.00965065210961, 0.010256099836,
            0.0110346081014, 0.0117147556349, 0.0123373351129, 0.0128834601832,
            0.0138847141125, 0.014168689932, 0.0147331399477, 0.0151335663707,
            0.015450772371, 0.015480903206, 0.0154926033582, 0.0155017716157,
            0.0156218668894, 0.0157089720273, 0.0159512118376, 0.0160321965202,
            0.0160695719649, 0.0160814363339, 0.0160814363339
        ])
        pitch = 0.0
        theta_str = np.array([
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 12.9342399734, 12.4835173655, 11.4807910924,
            10.9555299481, 10.2141623046, 9.50473135323, 8.7980712345,
            8.12522342051, 6.81383731475, 6.42068577363, 5.58414615907,
            4.96394315694, 4.44088253161, 4.38489418276, 4.35829308634,
            4.33139992746, 3.86272702658, 3.38639207628, 1.57773054352,
            0.953410121155, 0.504987738102, 0.0995174088527, -0.0878099
        ])
        r_sub_precurve0 = np.array([16.037355, 39.5374275, 63.0375])
        Rhub0 = 1.5375
        r_str0 = np.array([
            1.5375, 1.84056613137, 1.93905987557, 2.03755361977, 2.14220322299,
            2.24069696719, 2.33919071139, 2.90419974, 3.04095863882,
            3.13945238302, 5.637500205, 7.04226699698, 8.370800055,
            11.8494282928, 13.8375, 14.7182548841, 15.887499795, 18.5537233505,
            19.9875, 22.0564071286, 24.087500205, 26.16236509, 28.187499795,
            32.2875, 33.5678634821, 36.387500205, 38.5725768593, 40.487499795,
            40.6967540173, 40.7964789782, 40.8975, 42.6919644014, 44.5875,
            52.787499795, 56.204199945, 58.937499795, 61.67080026, 63.0375
        ])
        # precurve_str0 = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
        precurve_str0 = np.linspace(0.0, 5.0, len(dx))
        bladeLength0 = 61.5

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', BladeDeflection(len(dx)), promotes=['*'])
        prob.root.add('dx', IndepVarComp('dx', dx), promotes=['*'])
        prob.root.add('dy', IndepVarComp('dy', dy), promotes=['*'])
        prob.root.add('dz', IndepVarComp('dz', dz), promotes=['*'])
        prob.root.add('pitch', IndepVarComp('pitch', pitch), promotes=['*'])
        prob.root.add('theta_str',
                      IndepVarComp('theta_str', theta_str),
                      promotes=['*'])
        prob.root.add('r_sub_precurve0',
                      IndepVarComp('r_sub_precurve0', r_sub_precurve0),
                      promotes=['*'])
        prob.root.add('Rhub0', IndepVarComp('Rhub0', Rhub0), promotes=['*'])
        prob.root.add('r_str0', IndepVarComp('r_str0', r_str0), promotes=['*'])
        prob.root.add('precurve_str0',
                      IndepVarComp('precurve_str0', precurve_str0),
                      promotes=['*'])
        prob.root.add('bladeLength0',
                      IndepVarComp('bladeLength0', bladeLength0),
                      promotes=['*'])

        prob.setup(check=False)

        prob['dx'] = dx
        prob['dy'] = dy
        prob['dz'] = dz
        prob['pitch'] = pitch
        prob['theta_str'] = theta_str
        prob['r_sub_precurve0'] = r_sub_precurve0
        prob['Rhub0'] = Rhub0
        prob['r_str0'] = r_str0
        prob['precurve_str0'] = precurve_str0
        prob['bladeLength0'] = bladeLength0

        check_gradient_unit_test(self, prob, tol=1e-4)
Пример #24
0
    def test1(self):

        aeroLoads_r = np.array([
            1.575, 2.940033033, 5.67000020475, 8.39996676225, 13.86,
            15.9074997953, 20.0025, 24.0975002047, 28.1924997953, 32.2875,
            36.3825002048, 40.4774997953, 40.887, 44.5725, 52.7624997953,
            56.1750332378, 58.9049997952, 61.634966967, 63.0
        ])
        aeroLoads_Px = np.array([
            0.0, 394.495335464, 488.816521749, 403.91526216, 3498.00637403,
            3269.97046313, 4043.59672475, 4501.44255062, 5033.93200097,
            5718.97291507, 6320.75067512, 7109.17757276, 8059.89616754,
            8525.76224891, 8922.31561839, 8701.63574206, 8270.06152072,
            7295.11706029, 0.0
        ])
        aeroLoads_Py = np.array([
            -0, 70.1691953218, 168.88301855, 208.278564575, -1235.05334966,
            -1093.35619071, -1356.19151969, -1524.64653804, -1637.39245978,
            -1682.20028084, -1815.96503432, -1854.41936505, -2010.09761627,
            -1958.48701857, -1702.10190133, -1523.95755076, -1325.12331629,
            -935.412289309, -0
        ])
        aeroLoads_Pz = np.array([
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0, 0.0, 0.0
        ])
        aeroLoads_Omega = 12.0
        aeroLoads_pitch = 0.0
        aeroLoads_azimuth = 180.0
        r = np.array([
            1.575, 1.87769653853, 1.9760701684, 2.07444379828, 2.17896578003,
            2.27733940991, 2.37571303979, 2.940033033, 3.07662515267,
            3.17499878255, 5.67000020475, 7.0730538665, 8.39996676225,
            11.8743527705, 13.86, 14.7396807928, 15.9074997953, 18.5704718586,
            20.0025, 22.0688840711, 24.0975002047, 26.1698347667,
            28.1924997953, 32.2875, 33.5663020632, 36.3825002048,
            38.5649121314, 40.4774997953, 40.6864988295, 40.7861021746, 40.887,
            42.6792760302, 44.5725, 52.7624997953, 56.1750332378,
            58.9049997952, 61.634966967, 63.0
        ])
        theta = np.array([
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783, 13.2783,
            13.2783, 12.9342402117, 12.4835185594, 11.4807962375,
            10.9555376235, 10.2141732458, 9.50474414552, 8.79808349002,
            8.12523177814, 6.8138304713, 6.42067815056, 5.58414310075,
            4.96394649167, 4.44089107951, 4.38490319227, 4.35830230526,
            4.3314093512, 3.86273855446, 3.38640148153, 1.57771432025,
            0.953398905137, 0.504982546655, 0.0995167038088, -0.0878099
        ])
        tilt = 5.0
        rhoA = np.array([
            1086.31387923, 1102.59977206, 1120.90516514, 1126.20434689,
            1131.813843, 1137.07339365, 1086.16660785, 882.217532971,
            894.901622709, 899.719853943, 731.023082747, 608.342843886,
            542.222718332, 341.332102119, 336.952507859, 333.167490612,
            330.70966121, 326.000136659, 323.264256247, 317.941928823,
            310.869166296, 273.899186484, 262.928994775, 245.05275646,
            236.749218603, 217.487633686, 205.107910133, 194.259756942,
            167.463953528, 166.764129206, 165.810677408, 155.69651911,
            146.647497247, 100.919341248, 82.5679535343, 67.796593467,
            46.2981454714, 31.2090805766
        ])
        totalCone = np.array([
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5,
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5,
            2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5
        ])
        z_az = np.array([
            1.5375, 1.84056613137, 1.93905987557, 2.03755361977, 2.14220322299,
            2.24069696719, 2.33919071139, 2.90419974, 3.04095863882,
            3.13945238302, 5.637500205, 7.04226699698, 8.370800055,
            11.8494282928, 13.8375, 14.7182548841, 15.887499795, 18.5537233505,
            19.9875, 22.0564071286, 24.087500205, 26.16236509, 28.187499795,
            32.2875, 33.5678634821, 36.387500205, 38.5725768593, 40.487499795,
            40.6967540173, 40.7964789782, 40.8975, 42.6919644014, 44.5875,
            52.787499795, 56.204199945, 58.937499795, 61.67080026, 63.0375
        ])

        prob = Problem()
        prob.root = Group()
        prob.root.add('comp', TotalLoads(len(r)), promotes=['*'])
        prob.root.add('aeroLoads_r',
                      IndepVarComp('aeroLoads:r', np.zeros(len(aeroLoads_r))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Px',
                      IndepVarComp('aeroLoads:Px',
                                   np.zeros(len(aeroLoads_Px))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Py',
                      IndepVarComp('aeroLoads:Py',
                                   np.zeros(len(aeroLoads_Py))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Pz',
                      IndepVarComp('aeroLoads:Pz',
                                   np.zeros(len(aeroLoads_Pz))),
                      promotes=['*'])
        prob.root.add('aeroLoads_Omega',
                      IndepVarComp('aeroLoads:Omega', aeroLoads_Omega),
                      promotes=['*'])
        prob.root.add('aeroLoads_pitch',
                      IndepVarComp('aeroLoads:pitch', aeroLoads_pitch),
                      promotes=['*'])
        prob.root.add('aeroLoads_azimuth',
                      IndepVarComp('aeroLoads:azimuth', aeroLoads_azimuth),
                      promotes=['*'])
        prob.root.add('r', IndepVarComp('r', np.zeros(len(r))), promotes=['*'])
        prob.root.add('theta',
                      IndepVarComp('theta', np.zeros(len(theta))),
                      promotes=['*'])
        prob.root.add('tilt', IndepVarComp('tilt', tilt), promotes=['*'])
        prob.root.add('rhoA',
                      IndepVarComp('rhoA', np.zeros(len(rhoA))),
                      promotes=['*'])
        prob.root.add('totalCone',
                      IndepVarComp('totalCone', np.zeros(len(totalCone))),
                      promotes=['*'])
        prob.root.add('z_az',
                      IndepVarComp('z_az', np.zeros(len(z_az))),
                      promotes=['*'])
        prob.setup(check=False)

        prob['aeroLoads:r'] = aeroLoads_r
        prob['aeroLoads:Px'] = aeroLoads_Px
        prob['aeroLoads:Py'] = aeroLoads_Py
        prob['aeroLoads:Pz'] = aeroLoads_Pz
        prob['aeroLoads:Omega'] = aeroLoads_Omega
        prob['aeroLoads:pitch'] = aeroLoads_pitch
        prob['aeroLoads:azimuth'] = aeroLoads_azimuth
        prob['r'] = r
        prob['theta'] = theta
        prob['tilt'] = tilt
        prob['rhoA'] = rhoA
        prob['totalCone'] = totalCone
        prob['z_az'] = z_az

        check_gradient_unit_test(self, prob, tol=.003, display=False)