Example #1
0
    def testCurveFEM_FreeBeam_n1(self):
        # Test data from "Consistent Mass Matrix for Distributed Mass Systmes", John Archer,
        # Journal of the Structural Division Proceedings of the American Society of Civil Engineers,
        # pg. 168
        E = 2.0
        I = 3.0
        L = 4.0
        A = 5.0
        rho = 6.0
        hubR = 0.0
        omegaRPM = 0.0

        n = 1
        nodes = n+1
        
        z = L * np.arange(nodes)
        EIx = EIy = E*I*np.ones(nodes)
        EA = GJ = rhoJ = np.ones(nodes)
        rhoA = rho*A*np.ones(nodes)
        theta = precurv = presweep = np.zeros(nodes) #np.linspace(0.0, 3.0, nodes)

        mycurve = pb.CurveFEM(omegaRPM, theta, z, precurv, presweep, rhoA, False)
        freq = mycurve.frequencies(EA, EIx, EIy, GJ, rhoJ)

        
        m = rho * A
        alpha = m * (n*L)**4.0 / (840.0 * E * I)

        tol_pct = 5e-6 * 100
        expect = np.sqrt(0.85714 / alpha) / (2*np.pi)
        self.assertAlmostEqual(freq[1], expect, delta=tol_pct)
        self.assertAlmostEqual(freq[2], expect, delta=tol_pct)
        expect = np.sqrt(10.0 / alpha) / (2*np.pi)
        self.assertAlmostEqual(freq[4], expect, delta=tol_pct)
        self.assertAlmostEqual(freq[5], expect, delta=tol_pct)
Example #2
0
    def testCurveFEM_FixedBeam_n3_withShape(self):
        # Test data from "Consistent Mass Matrix for Distributed Mass Systmes", John Archer,
        # Journal of the Structural Division Proceedings of the American Society of Civil Engineers,
        # pg. 168
        E = 2.0
        I = 3.0
        L = 4.0
        A = 5.0
        rho = 6.0
        hubR = 0.0
        omegaRPM = 12.0

        n = 3
        nodes = n+1
        
        z = L * np.arange(nodes)
        EIx = EIy = E*I*np.ones(nodes)
        EA = GJ = rhoJ = np.ones(nodes)
        rhoA = rho*A*np.ones(nodes)
        theta = precurv = presweep = np.linspace(0.0, 3.0, nodes)

        mycurve = pb.CurveFEM(omegaRPM, theta, z, precurv, presweep, rhoA, True)
        freq = mycurve.frequencies(EA, EIx, EIy, GJ, rhoJ)

        #truth = _curvefem.frequencies(omegaRPM, L, hubR, z/L, theta, rhoA, EIx, EIy, GJ, EA, rhoJ, precurv, presweep)
        #print "n3 odd", truth.tolist()
        truth = np.array([0.00583962278555471, 0.013747011747362698, 0.019857000185537085, 0.022065457582918686, 0.022508587859798306, 0.06494224803437999, 0.07593365714823054, 0.08099501901331865, 0.08100059834010384, 0.11781473080899654, 0.1973084679918305, 0.44555268080407895, 0.48641244353481683, 0.7481252945270574, 0.7730228919707995, 1.0518193329242682, 1.0696357241743277, 1.4148111654258362, 1.4280996628456801, 1.9080030090517186, 1.9178773250559262])
        npt.assert_almost_equal(freq, truth)
Example #3
0
    def testCurveFEM_FixedBeam_n2(self):
        # Test data from "Consistent Mass Matrix for Distributed Mass Systmes", John Archer,
        # Journal of the Structural Division Proceedings of the American Society of Civil Engineers,
        # pg. 168
        E = 2.0
        I = 3.0
        L = 4.0
        A = 5.0
        rho = 6.0
        hubR = 0.0
        omegaRPM = 0.0

        n = 2
        nodes = n+1
        
        z = L * np.arange(nodes)
        EIx = EIy = E*I*np.ones(nodes)
        EA = GJ = rhoJ = np.ones(nodes)
        rhoA = rho*A*np.ones(nodes)
        theta = precurv = presweep = np.zeros(nodes) #np.linspace(0.0, 3.0, nodes)

        mycurve = pb.CurveFEM(omegaRPM, theta, z, precurv, presweep, rhoA, True)
        freq = mycurve.frequencies(EA, EIx, EIy, GJ, rhoJ)

        #truth = _curvefem.frequencies(omegaRPM, L, hubR, z/L, theta, rhoA, EIx, EIy, GJ, EA, rhoJ, precurv, presweep)
        #print "n2", truth.tolist()
        truth = np.array([0.003912151523474228, 0.003912151523474228, 0.005852976699216038, 0.012582302518525731, 0.02044674778626943, 0.02471287957376343, 0.02471287957376343, 0.025285550340850595, 0.025285550340850595, 0.032042058241816634, 0.06888168035399123, 0.0835842095344649, 0.0835842095344649, 0.09116764495898616, 0.09116764495898616, 0.11193550172703298, 0.24259762924185935, 0.24259762924185935])
        npt.assert_almost_equal(freq, truth)
Example #4
0
    def testCurveFEM_FixedBeam_n3(self):
        # Test data from "Consistent Mass Matrix for Distributed Mass Systmes", John Archer,
        # Journal of the Structural Division Proceedings of the American Society of Civil Engineers,
        # pg. 168
        E = 2.0
        I = 3.0
        L = 4.0
        A = 5.0
        rho = 6.0
        hubR = 0.0
        omegaRPM = 0.0

        n = 3
        nodes = n+1
        
        z = L * np.arange(nodes)
        EIx = EIy = E*I*np.ones(nodes)
        EA = GJ = rhoJ = np.ones(nodes)
        rhoA = rho*A*np.ones(nodes)
        theta = precurv = presweep = np.zeros(nodes) #np.linspace(0.0, 3.0, nodes)

        mycurve = pb.CurveFEM(omegaRPM, theta, z, precurv, presweep, rhoA, True)
        freq = mycurve.frequencies(EA, EIx, EIy, GJ, rhoJ)

        #truth = _curvefem.frequencies(omegaRPM, L, hubR, z/L, theta, rhoA, EIx, EIy, GJ, EA, rhoJ, precurv, presweep)
        #print "n3", truth.tolist()
        truth = np.array([0.0017380701632556908, 0.0017380701632562416, 0.003847212436706601, 0.010926964080897513, 0.010926964080897626, 0.012576854615234626, 0.012587751208210572, 0.02106152327278283, 0.02282612879817582, 0.02528527062288509, 0.02528527062288511, 0.03087567297329799, 0.030875672973298095, 0.06885185586578292, 0.06891150914730364, 0.06953079721389932, 0.06953079721389936, 0.09116748336205782, 0.09116748336205784, 0.12496139758839682, 0.1308572353442806, 0.13085723534428065, 0.2608788373591399, 0.2608788373591401])
        npt.assert_almost_equal(freq, truth)
Example #5
0
    def testCurveFEM_FixedBeam_n1(self):
        # Test data from "Consistent Mass Matrix for Distributed Mass Systmes", John Archer,
        # Journal of the Structural Division Proceedings of the American Society of Civil Engineers,
        # pg. 168
        E = 2.0
        I = 3.0
        L = 4.0
        A = 5.0
        rho = 6.0
        hubR = 0.0
        omegaRPM = 0.0

        n = 1
        nodes = n+1
        
        z = L * np.arange(nodes)
        EIx = EIy = E*I*np.ones(nodes)
        EA = GJ = rhoJ = np.ones(nodes)
        rhoA = rho*A*np.ones(nodes)
        theta = precurv = presweep = np.zeros(nodes) #np.linspace(0.0, 3.0, nodes)

        mycurve = pb.CurveFEM(omegaRPM, theta, z, precurv, presweep, rhoA, True)
        freq = mycurve.frequencies(EA, EIx, EIy, GJ, rhoJ)

        #truth = _curvefem.frequencies(omegaRPM, L, hubR, z/L, theta, rhoA, EIx, EIy, GJ, EA, rhoJ, precurv, presweep)
        #print "n1", truth.tolist()
        truth = np.array([0.012572866969753228, 0.012591740426479996, 0.015715395588976708, 0.015715395588976708, 0.02528529867098764, 0.02528529867098764, 0.06883002554331129, 0.06893334807998643, 0.09116741813672731, 0.09116741813672731, 0.1548391375450802, 0.1548391375450802])
        npt.assert_almost_equal(freq, truth)