Beispiel #1
0
    def compute(self, inputs, outputs):
        # Unpack some variables
        axial_stress = inputs['axial_stress']
        shear_stress = inputs['shear_stress']
        hoop_stress  = inputs['hoop_stress']
        sigma_y      = inputs['sigma_y'] * np.ones(axial_stress.shape)
        E            = inputs['E'] * np.ones(axial_stress.shape)
        L_reinforced = inputs['L_reinforced'] * np.ones(axial_stress.shape)
        d,_          = nodal2sectional(inputs['d'])
        z_section,_  = nodal2sectional(inputs['z'])

        # Frequencies
        outputs['structural_frequencies'] = np.zeros(2)
        outputs['structural_frequencies'][0] = inputs['f1']
        outputs['structural_frequencies'][1] = inputs['f2']
        
        # von mises stress
        outputs['stress'] = Util.vonMisesStressUtilization(axial_stress, hoop_stress, shear_stress,
                      inputs['gamma_f']*inputs['gamma_m']*inputs['gamma_n'], sigma_y)

        # shell buckling
        outputs['shell_buckling'] = Util.shellBucklingEurocode(d, inputs['t'], axial_stress, hoop_stress,
                                                                shear_stress, L_reinforced, E, sigma_y, inputs['gamma_f'], inputs['gamma_b'])

        # global buckling
        tower_height = inputs['z'][-1] - inputs['z'][0]
        M = np.sqrt(inputs['Mxx']**2 + inputs['Myy']**2)
        outputs['global_buckling'] = Util.bucklingGL(d, inputs['t'], inputs['Fz'], M, tower_height, E,
                                                      sigma_y, inputs['gamma_f'], inputs['gamma_b'])

        # fatigue
        N_DEL = 365.0*24.0*3600.0*inputs['life'] * np.ones(len(inputs['t']))
Beispiel #2
0
    def testPlasticityRF(self):
        Fy = 4.0

        Fe = 1.0
        Fi = Fe
        self.assertEqual(util._plasticityRF(Fe, Fy), Fi)
        npt.assert_equal(util._plasticityRF(Fe * myones, Fy), Fi * myones)

        Fe = 3.0
        Fr = 4.0 / 3.0
        Fi = Fe * Fr * (1.0 + 3.75 * Fr**2)**(-0.25)
        self.assertEqual(util._plasticityRF(Fe, Fy), Fi)
        npt.assert_equal(util._plasticityRF(Fe * myones, Fy), Fi * myones)
Beispiel #3
0
    def testStiffenerFactors(self):
        # Use the API 2U Appendix B as a big unit test!
        ksi_to_si = 6894757.29317831
        lbperft3_to_si = 16.0185
        ft_to_si = 0.3048
        in_to_si = ft_to_si / 12.0
        kip_to_si = 4.4482216 * 1e3

        R_od = 0.5 * 600 * np.ones((3, )) * in_to_si
        t_wall = 0.75 * np.ones((3, )) * in_to_si
        t_web = 5. / 8. * np.ones((3, )) * in_to_si
        h_web = 14.0 * np.ones((3, )) * in_to_si
        t_flange = 1.0 * np.ones((3, )) * in_to_si
        w_flange = 10.0 * np.ones((3, )) * in_to_si
        L_stiffener = 5.0 * np.ones((3, )) * ft_to_si
        E = 29e3 * ksi_to_si
        nu = 0.3

        pressure = 1e-3 * 64. * 60. / 144. * ksi_to_si
        axial = 9000 * kip_to_si / (2 * np.pi *
                                    (R_od[0] - 0.5 * t_wall[0]) * t_wall[0])
        self.assertAlmostEqual(axial,
                               0.5 * 9000 / 299.625 / 0.75 / np.pi * ksi_to_si,
                               -4)
        KthL, KthG = util._compute_stiffener_factors(pressure, axial, R_od,
                                                     t_wall, h_web, t_web,
                                                     w_flange, t_flange,
                                                     L_stiffener, E, nu)
        npt.assert_almost_equal(KthL, 1.0 * np.ones((3, )), decimal=1)
        npt.assert_almost_equal(KthG, 0.5748 * np.ones(
            (3, )), decimal=4)  #0.5642 if R_flange accounts for t_wall
    def testTBeam(self):
        h_web = 10.0
        w_flange = 8.0
        t_web = 3.0
        t_flange = 4.0

        area, y_cg, Ixx, Iyy = util._TBeamProperties(h_web, t_web, w_flange, t_flange)
        self.assertEqual(area, 62.0)
        self.assertAlmostEqual(y_cg, 8.6129, 4)
        self.assertAlmostEqual(Iyy, 193.16666, 4)
        self.assertAlmostEqual(Ixx, 1051.37631867699, 4)

        area, y_cg, Ixx, Iyy = util._TBeamProperties(h_web*myones, t_web*myones, w_flange*myones, t_flange*myones)
        npt.assert_equal(area, 62.0*myones)
        npt.assert_almost_equal(y_cg, 8.6129*myones, 1e-4)
        npt.assert_almost_equal(Iyy, 193.16666*myones, 1e-4)
        npt.assert_almost_equal(Ixx, 1051.37631867699*myones, 1e-4)
    def testAppliedHoop(self):
        # Use the API 2U Appendix B as a big unit test!
        ksi_to_si = 6894757.29317831
        lbperft3_to_si = 16.0185
        ft_to_si = 0.3048
        in_to_si = ft_to_si / 12.0

        R_od     = 0.5 * 600 * in_to_si
        t_wall   = 0.75 * in_to_si
        rho      = 64.0 * lbperft3_to_si
        z        = 60 * ft_to_si
        pressure = rho * g * z
        expect   = 1e-3 * 64. * 60. / 144. * ksi_to_si

        self.assertAlmostEqual(pressure, expect, -4)
        expect *= R_od/t_wall
        self.assertAlmostEqual(util._compute_applied_hoop(pressure, R_od, t_wall), expect, -4)
        npt.assert_almost_equal(util._compute_applied_hoop(pressure*myones, R_od*myones, t_wall*myones), expect*myones, decimal=-4)
Beispiel #6
0
    def testCheckStresses(self):
        # Use the API 2U Appendix B as a big unit test!
        ksi_to_si = 6894757.29317831
        lbperft3_to_si = 16.0185
        ft_to_si = 0.3048
        in_to_si = ft_to_si / 12.0
        kip_to_si = 4.4482216 * 1e3

        R_od = 0.5 * 600 * np.ones((3, )) * in_to_si
        t_wall = 0.75 * np.ones((3, )) * in_to_si
        t_web = 5. / 8. * np.ones((3, )) * in_to_si
        h_web = 14.0 * np.ones((3, )) * in_to_si
        t_flange = 1.0 * np.ones((3, )) * in_to_si
        w_flange = 10.0 * np.ones((3, )) * in_to_si
        h_section = 50.0 * np.ones((3, )) * ft_to_si
        L_stiffener = 5.0 * np.ones((3, )) * ft_to_si
        rho = 64.0 * lbperft3_to_si
        E = 29e3 * ksi_to_si
        nu = 0.3
        sigma_y = 50 * ksi_to_si

        # Find pressure to give "head" of 60ft- put mid-point of middle section at this depth
        z = 60 * ft_to_si
        P = rho * g * z
        sigma_ax = 9000 * kip_to_si / (2 * np.pi *
                                       (R_od[0] - 0.5 * t_wall[0]) * t_wall[0])

        (axial_local_unity, axial_general_unity, external_local_unity,
         external_general_unity, _, _, _,
         _) = util.shellBuckling_withStiffeners(P,
                                                sigma_ax,
                                                R_od,
                                                t_wall,
                                                h_section,
                                                h_web,
                                                t_web,
                                                w_flange,
                                                t_flange,
                                                L_stiffener,
                                                E,
                                                nu,
                                                sigma_y,
                                                loading='radial')

        #npt.assert_almost_equal(web_compactness, 24.1/22.4 * np.ones((3,)), decimal=3)
        #npt.assert_almost_equal(flange_compactness, 9.03/5.0 * np.ones((3,)), decimal=3)
        npt.assert_almost_equal(axial_local_unity, 1.07, 1)
        npt.assert_almost_equal(axial_general_unity, 0.34, 1)
        npt.assert_almost_equal(external_local_unity, 1.07, 1)
        npt.assert_almost_equal(external_general_unity, 0.59, 1)
 def testSafetyFactor(self):
     Fy = 100.0
     k = 1.25
     self.assertEqual(util._safety_factor(25.0, Fy), k*1.2)
     npt.assert_equal(util._safety_factor(25.0*myones, Fy), k*1.2*myones)
     self.assertEqual(util._safety_factor(125.0, Fy), k*1.0)
     npt.assert_equal(util._safety_factor(125.0*myones, Fy), k*1.0*myones)
     self.assertAlmostEqual(util._safety_factor(80.0, Fy), k*1.08)
     npt.assert_almost_equal(util._safety_factor(80.0*myones, Fy), k*1.08*myones)
    def testStressLimits(self):
        # Use the API 2U Appendix B as a big unit test!
        ksi_to_si = 6894757.29317831
        lbperft3_to_si = 16.0185
        ft_to_si = 0.3048
        in_to_si = ft_to_si / 12.0
        kip_to_si = 4.4482216 * 1e3

        R_od = 0.5*600 * np.ones((3,)) * in_to_si
        t_wall = 0.75 * np.ones((3,)) * in_to_si
        t_web = 5./8. * np.ones((3,)) * in_to_si
        h_web = 14.0 * np.ones((3,)) * in_to_si
        t_flange = 1.0 * np.ones((3,)) * in_to_si
        w_flange = 10.0 * np.ones((3,)) * in_to_si
        L_stiffener = 5.0 * np.ones((3,)) * ft_to_si
        h_section = 50.0 * np.ones((3,)) * ft_to_si
        E = 29e3 * ksi_to_si * np.ones((3,))
        nu = 0.3 * np.ones((3,))
        sigma_y = 50 * ksi_to_si * np.ones((3,))

        KthG = 0.5748
        FxeL, FreL, FxeG, FreG = util._compute_elastic_stress_limits(R_od, t_wall, h_section, h_web, t_web, w_flange, t_flange,
                                                                     L_stiffener, E, nu, KthG, loading='radial')
        npt.assert_almost_equal(FxeL, 16.074844135928885*ksi_to_si*np.ones((3,)), decimal=1)
        npt.assert_almost_equal(FreL, 19.80252150945599*ksi_to_si*np.ones((3,)), decimal=1)
        npt.assert_almost_equal(FxeG, 37.635953475479639*ksi_to_si*np.ones((3,)), decimal=1)
        npt.assert_almost_equal(FreG, 93.77314503852581*ksi_to_si*np.ones((3,)), decimal=1)

        FxcL = util._plasticityRF(FxeL, sigma_y)
        FxcG = util._plasticityRF(FxeG, sigma_y)
        FrcL = util._plasticityRF(FreL, sigma_y)
        FrcG = util._plasticityRF(FreG, sigma_y)
        npt.assert_almost_equal(FxcL, 1.0*16.074844135928885*ksi_to_si*np.ones((3,)), decimal=1)
        npt.assert_almost_equal(FrcL, 1.0*19.80252150945599*ksi_to_si*np.ones((3,)), decimal=1)
        npt.assert_almost_equal(FxcG, 0.799647237534*37.635953475479639*ksi_to_si*np.ones((3,)), decimal=1)
        npt.assert_almost_equal(FrcG, 0.444735273606*93.77314503852581*ksi_to_si*np.ones((3,)), decimal=1)
Beispiel #9
0
    def setup(self):
        nPoints      = self.options['nPoints']
        nFull        = self.options['nFull']
        topLevelFlag = self.options['topLevelFlag']
        nRefine = (nFull-1)/(nPoints-1)
        
        # Independent variables that are unique to TowerSE
        towerIndeps = IndepVarComp()
        towerIndeps.add_output('tower_outer_diameter', np.zeros(nPoints), units='m')
        towerIndeps.add_output('tower_section_height', np.zeros(nPoints-1), units='m')
        towerIndeps.add_output('tower_wall_thickness', np.zeros(nPoints-1), units='m')
        towerIndeps.add_output('tower_buckling_length', 0.0, units='m')
        towerIndeps.add_output('tower_outfitting_factor', 0.0)
        self.add_subsystem('towerIndepsLean', towerIndeps, promotes=['*'])

        # Independent variables that may be duplicated at higher levels of aggregation
        if topLevelFlag:
            sharedIndeps = IndepVarComp()
            sharedIndeps.add_output('hub_height', 0.0, units='m')
            sharedIndeps.add_output('material_density', 0.0, units='kg/m**3')
            self.add_subsystem('sharedIndepsLean', sharedIndeps, promotes=['*'])
        
        # All the static components
        self.add_subsystem('geometry', CylinderDiscretization(nPoints=nPoints, nRefine=nRefine), promotes=['*'])
        self.add_subsystem('tgeometry', TowerDiscretization(), promotes=['hub_height','height_constraint'])
        
        self.add_subsystem('cm', CylinderMass(nPoints=nFull), promotes=['material_density','z_full','d_full','t_full',
                                                      'material_cost_rate','labor_cost_rate','painting_cost_rate'])
        self.add_subsystem('tm', TowerMass(nPoints=nFull), promotes=['tower_mass','tower_center_of_mass','tower_I_base','tower_raw_cost'])
        self.add_subsystem('gc', Util.GeometricConstraints(nPoints=nPoints), promotes=['min_d_to_t','max_taper','manufacturability','weldability'])
        self.add_subsystem('turb', TurbineMass(), promotes=['turbine_mass','rna_mass', 'rna_cg', 'rna_I','hub_height'])
        
        # Connections for geometry and mass
        self.connect('tower_section_height', 'section_height')
        self.connect('tower_outer_diameter', ['diameter', 'gc.d'])
        self.connect('tower_wall_thickness', ['wall_thickness', 'gc.t'])
        self.connect('tower_outfitting_factor', 'cm.outfitting_factor')
        self.connect('z_param', 'tgeometry.z_end', src_indices=[nPoints-1])

        self.connect('cm.mass', 'tm.cylinder_mass')
        self.connect('cm.cost', 'tm.cylinder_cost')
        self.connect('cm.center_of_mass', 'tm.cylinder_center_of_mass')
        self.connect('cm.section_center_of_mass','tm.cylinder_section_center_of_mass')
        self.connect('cm.I_base','tm.cylinder_I_base')
        self.connect('tower_mass', 'turb.tower_mass')
        self.connect('tower_center_of_mass', 'turb.tower_center_of_mass')
        self.connect('tower_I_base', 'turb.tower_I_base')