Ejemplo n.º 1
0
        dfl.tower_d = np.array([6.0, 4.935, 3.87])
        dfl.towerHt = 77.5632866084

        check_gradient_unit_test(self, dfl)


    def test2(self):

        dfl = MaxTipDeflection()
        dfl.Rtip = 63.0
        dfl.precurveTip = 5.0
        dfl.presweepTip = 2.0
        dfl.precone = -2.5
        dfl.tilt = 5.0
        dfl.hub_tt = np.array([-6.29400379597, 0.0, 3.14700189798])
        dfl.tower_z = np.array([0.0, 0.5, 1.0])
        dfl.tower_d = np.array([6.0, 4.935, 3.87])
        dfl.towerHt = 77.5632866084

        check_gradient_unit_test(self, dfl)




if __name__ == '__main__':
    import wisdem.turbinese.turbine

    check_for_missing_unit_tests([wisdem.turbinese.turbine])
    unittest.main()

Ejemplo n.º 2
0
        bd.bladeLength0 = 61.5

        check_gradient_unit_test(self, bd, tol=1e-4)


class TestDamageLoads(unittest.TestCase):

    def test1(self):

        dl = DamageLoads()
        dl.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])
        dl.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])
        dl.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])
        dl.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])
        dl.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])

        check_gradient_unit_test(self, dl, tol=5e-5)


if __name__ == '__main__':
    import rotorse.rotor

    check_for_missing_unit_tests([rotorse.rotor])
    unittest.main()

    # from unittest import TestSuite
    # blah = TestSuite()
    # blah.addTest(TestDamageLoads('test1'))
    # unittest.TextTestRunner().run(blah)

        comp.powerperf_cost = 912133.333333
        comp.roads_cost = 7713048.0
        comp.compound_cost = 901575.0
        comp.building_cost = 633735.251317
        comp.foundation_cost = 11286436.7811
        comp.erection_cost = 9382605.40137
        comp.elecmat_cost = 14675585.0
        comp.elecinst_cost = 7830230.0
        comp.substation_cost = 5530851.41472
        comp.transmission_cost = 4246267.80099
        comp.projmgmt_cost = 2607139.155
        comp.development_cost = 5000000.0
        comp.insurance_cost = 665728.735622
        comp.markup_cost = -26040000.0
        comp.insurance_alpha = 0.0056
        comp.markup_alpha = 0.1302
        comp.multiplier = 1.3

        check_gradient_unit_test(self, comp)




if __name__ == '__main__':

    import landbos
    check_for_missing_unit_tests([landbos])
    unittest.main()


Ejemplo n.º 4
0
        comp.turbine_cost = 2000000.0
        comp.nTurbines = 100
        comp.transportation_cost = 200000000.0
        comp.engineering_cost = 1112596.36154
        comp.powerperf_cost = 912133.333333
        comp.roads_cost = 7713048.0
        comp.compound_cost = 901575.0
        comp.building_cost = 633735.251317
        comp.foundation_cost = 11286436.7811
        comp.erection_cost = 9382605.40137
        comp.elecmat_cost = 14675585.0
        comp.elecinst_cost = 7830230.0
        comp.substation_cost = 5530851.41472
        comp.transmission_cost = 4246267.80099
        comp.projmgmt_cost = 2607139.155
        comp.development_cost = 5000000.0
        comp.insurance_cost = 665728.735622
        comp.markup_cost = -26040000.0
        comp.insurance_alpha = 0.0056
        comp.markup_alpha = 0.1302
        comp.multiplier = 1.3

        check_gradient_unit_test(self, comp)


if __name__ == '__main__':

    import landbos
    check_for_missing_unit_tests([landbos])
    unittest.main()
Ejemplo n.º 5
0
        dfl.precone = 2.5
        dfl.tilt = 5.0
        dfl.hub_tt = np.array([-6.29400379597, 0.0, 3.14700189798])
        dfl.tower_z = np.array([0.0, 0.5, 1.0])
        dfl.tower_d = np.array([6.0, 4.935, 3.87])
        dfl.towerHt = 77.5632866084

        check_gradient_unit_test(self, dfl)

    def test2(self):

        dfl = MaxTipDeflection()
        dfl.Rtip = 63.0
        dfl.precurveTip = 5.0
        dfl.presweepTip = 2.0
        dfl.precone = -2.5
        dfl.tilt = 5.0
        dfl.hub_tt = np.array([-6.29400379597, 0.0, 3.14700189798])
        dfl.tower_z = np.array([0.0, 0.5, 1.0])
        dfl.tower_d = np.array([6.0, 4.935, 3.87])
        dfl.towerHt = 77.5632866084

        check_gradient_unit_test(self, dfl)


if __name__ == '__main__':
    import wisdem.turbinese.turbine

    check_for_missing_unit_tests([wisdem.turbinese.turbine])
    unittest.main()
Ejemplo n.º 6
0
        check_gradient_unit_test(self, wcdf)



class TestRayleighCDF(unittest.TestCase):

    def test1(self):

        rcdf = RayleighCDF()
        rcdf.xbar = 6.0
        rcdf.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])

        check_gradient_unit_test(self, rcdf, tol=2e-6)




if __name__ == '__main__':
    import rotorse.rotoraero
    import rotorse.rotoraerodefaults

    check_for_missing_unit_tests([rotorse.rotoraero, rotorse.rotoraerodefaults])

    unittest.main()

    # from unittest import TestSuite
    # blah = TestSuite()
    # blah.addTest(TestRegulatedPowerCurve('test1'))
    # unittest.TextTestRunner().run(blah)
Ejemplo n.º 7
0
            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
        ])
        dl.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
        ])

        check_gradient_unit_test(self, dl, tol=5e-5)


if __name__ == '__main__':
    import rotorse.rotor

    check_for_missing_unit_tests([rotorse.rotor])
    unittest.main()

    # from unittest import TestSuite
    # blah = TestSuite()
    # blah.addTest(TestDamageLoads('test1'))
    # unittest.TextTestRunner().run(blah)
Ejemplo n.º 8
0
            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
        ])

        check_gradient_unit_test(self, rcdf, tol=2e-6)


if __name__ == '__main__':
    import rotorse.rotoraero
    import rotorse.rotoraerodefaults

    check_for_missing_unit_tests(
        [rotorse.rotoraero, rotorse.rotoraerodefaults])

    unittest.main()

    # from unittest import TestSuite
    # blah = TestSuite()
    # blah.addTest(TestRegulatedPowerCurve('test1'))
    # unittest.TextTestRunner().run(blah)