コード例 #1
0
ファイル: test_clt.py プロジェクト: okoham/composites
    def setUp(self):
        self.mat = TransverseIsotropicPlyMaterial(name='exmat2',
                                                  E11=130000.,
                                                  E22=4650.,
                                                  G12=4650.,
                                                  nu12=0.35,
                                                  nu23=0.45,
                                                  a11t=0.15e-6,
                                                  a22t=28.7e-6,
                                                  t=0.13,
                                                  F11t=1200.,
                                                  F11c=1000.,
                                                  F22t=50.,
                                                  F22c=120.,
                                                  F12s=75.)
        self.angles = [
            45, -45, 0, 90, 0, 90, 45, -45, 0, 90, 90, 0, -45, 45, 90, 0, 90,
            0, -45, 45
        ]
        plydef = [(a, self.mat) for a in self.angles]
        self.lam = clt.Laminate(plydef)
        self.lamd = clt.Laminate(plydef)
        for layer in self.lamd.layers:
            layer.set_matrix_failure(True)
        self.load = np.array([308.3, -22.2, 449.2, 0, 0, 0])
        self.sol = self.lam.get_linear_response(self.load)
        self.sold = self.lamd.get_linear_response(self.load)

        # put into it's own class!
        layup = clt.stacking_to_layup2(self.angles)
        self.ulam = clt.UnorderedLaminate(layup, self.mat)
        self.ulamd = clt.UnorderedLaminate(layup, self.mat)
        #self.ulamd = plainstrength.make_degraded_laminate(self.ulam)
        for layer in self.ulamd.layers:
            layer.set_matrix_failure(True)
コード例 #2
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def setUp(self):
     self.mat = TransverseIsotropicPlyMaterial(name='exmat2',
                                               E11=130000.,
                                               E22=4650.,
                                               G12=4650.,
                                               nu12=0.35,
                                               nu23=0.45,
                                               a11t=0.15e-6,
                                               a22t=28.7e-6,
                                               t=0.13,
                                               F11t=1200.,
                                               F11c=1000.,
                                               F22t=50.,
                                               F22c=120.,
                                               F12s=75.)
     self.angles = [
         45, -45, 0, 90, 0, 90, 45, -45, 0, 90, 90, 0, -45, 45, 90, 0, 90,
         0, -45, 45
     ]
     plydef = [(a, self.mat) for a in self.angles]
     self.lam = clt.Laminate(plydef)
     self.lamd = clt.Laminate(plydef)
     for layer in self.lamd.layers:
         layer.set_matrix_failure(True)
     self.load = np.array([308.3, -22.2, 449.2, 0, 0, 0])
     self.sol = self.lam.get_linear_response(self.load)
     self.sold = self.lamd.get_linear_response(self.load)
コード例 #3
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_ex(self):
     # test Ex for [0_3/90 laminate], T300/5208
     # Tsai Eq. 4.15
     lam = clt.Laminate([(0., self.cfrp_t300), (0., self.cfrp_t300),
                         (0., self.cfrp_t300), (90., self.cfrp_t300)])
     ref = 138880.
     val = lam.Ex()
     self.assertAlmostEqual(val, ref)
コード例 #4
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_nu(self):
     # test Ex for [0_3/90 laminate], T300/5208
     # Tsai Eq. 4.15
     lam = clt.Laminate([(0., self.cfrp_t300), (0., self.cfrp_t300),
                         (0., self.cfrp_t300), (90., self.cfrp_t300)])
     ref = 0.054
     val = lam.nuxy()
     self.assertAlmostEqual(val, ref)
コード例 #5
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_layer_A3(self):
     # compare matrix norm of matrix A of one-ply laminate
     # Tsai Table 4.1
     # E-glass, 90°
     lam_kfrp_45 = clt.Laminate([(45., self.kfrp)])
     expect = np.array([[2.97e3, 2.40e3, 2.22e3], [2.40e3, 2.97e3, 2.22e3],
                        [2.22e3, 2.22e3, 2.45e3]])
     result = lam_kfrp_45.A()
     assert_allclose(result, expect, 1e-2)
コード例 #6
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_layer_A1(self):
     # compare matrix norm of matrix A of one-ply laminate
     # Tsai Table 4.1
     # B(4), 0°
     lam_bfrp_0 = clt.Laminate([(0., self.bfrp)])
     expect = np.array([[25.62e3, 0.53e3, 0], [0.53e3, 2.32e3, 0.],
                        [0., 0., 0.7e3]])
     result = lam_bfrp_0.A()
     assert_allclose(result, expect, 1e-2)
コード例 #7
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_layer_A2(self):
     # compare matrix norm of matrix A of one-ply laminate
     # Tsai Table 4.1
     # E-glass, 90°
     lam_gfrp_90 = clt.Laminate([(90., self.gfrp)])
     expect = np.array([[1.05e3, 0.27e3, 0.], [0.27e3, 4.90e3, 0.],
                        [0., 0., 0.52e3]])
     result = lam_gfrp_90.A()
     assert_allclose(result, expect, atol=10)
コード例 #8
0
ファイル: test_clt.py プロジェクト: okoham/composites
    def setUp(self):
        # aerospatiale example, C6
        angles = (45, -45, 0, 90, 0, 90, 45, -45, 0, 90, 90, 0, -45, 45, 90, 0,
                  90, 0, -45, 45)
        plydef = [(a, self.mat) for a in angles]

        self.lam = clt.Laminate(plydef)
        self.load = np.array([308.3, -22.2, 449.2, 0, 0, 0])
        self.sol = self.lam.get_linear_response(self.load)
        self.temp = 0.
コード例 #9
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_d(self):
     # (2/2/2/2)
     # exampe mts006, D5
     pd2 = [0, 45, -45, 90, 90, -45, 45, 0]
     pd2 = [(angle, self.mat1) for angle in pd2]
     lam = clt.Laminate(pd2)
     # Qbar, 0 deg
     expect = 10.0 * np.array([[858, 123, 55], [123, 194, 55],
                               [55, 55, 151]])
     assert_allclose(lam.D(), expect, atol=6)
コード例 #10
0
    def setUp(self):
        mat10 = Material(E11=38000., E22=9000., G12=3600., nu12=0.32, t=1.)
        mat15 = Material(E11=38000., E22=9000., G12=3600., nu12=0.32, t=1.5)

        self.lam = clt.Laminate([(15, mat15), (-30, mat10), (-15, mat15),
                                 (30, mat10)])

        # mload = np.array([2000, 1000, 500, 0, 0, 0]) # used in text
        mload = np.array([1000, 500, 250, 0, 0, 0])  # used in calculations
        self.sol = self.lam.get_linear_response(mload)
コード例 #11
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_clt_a0_temp(self):
     # result sould be alpha_t
     plydef = [(0., self.m11)]
     lam = clt.Laminate(plydef)
     mload = np.zeros(6)
     temps = 1.
     sol = lam.get_linear_response(mload, temps)
     # s: array(6). s[0] = a11t, s[1] = a22t, rest 0
     expect = np.array([self.m1.a11t, self.m1.a22t, 0., 0., 0., 0.])
     assert_array_almost_equal(sol.eps_kappa(), expect)
コード例 #12
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_clt_a0_nx(self):
     # result sould be alpha_t
     #m11 = self.m11
     plydef = [(0., self.m11)]
     lam = clt.Laminate(plydef)
     mload = np.array([1, 0, 0, 0, 0, 0])
     #temps = 0.
     sol = lam.get_linear_response(mload)  #, mload)lam.solve(mload, temps)
     expect = np.array(
         [1. / self.m11.E11, -self.m11.nu12 / self.m11.E11, 0., 0., 0., 0.])
     assert_allclose(sol.eps_kappa(), expect, rtol=1e-6)
コード例 #13
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_kappa(self):
     # (2/2/2/2)
     # exampe mts006, D5
     pd2 = [0, 45, -45, 90, 90, -45, 45, 0]
     pd2 = [(angle, self.mat1) for angle in pd2]
     lam = clt.Laminate(pd2)
     # Qbar, 0 deg
     load = np.array([0, 0, 0, 100, 0, -50])
     #temp = 0.
     expect = np.array([0, 0, 0, 13.82e-3, 2.283e-3, -38.98e-3])
     sol = lam.get_linear_response(load)
     assert_allclose(sol.eps_kappa(), expect, atol=0.001)
コード例 #14
0
    def setUp(self):
        mat25 = Material(E11=45000.,
                         E22=10000.,
                         G12=4500.,
                         a11t=5e-6,
                         a22t=20e-6,
                         nu12=0.31,
                         t=1.)
        self.lam = clt.Laminate([(90, mat25), (0, mat25), (90, mat25)])

        self.mload = np.zeros(6)
        self.dtemp = -100
        self.sol = self.lam.get_linear_response(self.mload, self.dtemp)
コード例 #15
0
ファイル: test_clt.py プロジェクト: okoham/composites
    def setUp(self):
        # hsb 37103-03 B 1991, example
        # G23 = 0.5*E22/(1. + nu23) = 4600
        # => nu23 = (0.5 E22/G23) - 1

        self.mat = TransverseIsotropicPlyMaterial(name='T300_Epoxy',
                                                  E11=141000.,
                                                  E22=9400.,
                                                  G12=4600.,
                                                  nu12=0.30,
                                                  nu23=0.46875,
                                                  t=0.25)
        #
        self.plydef = [(0., self.mat), (90., self.mat), (90., self.mat),
                       (0., self.mat)]
        #
        self.lam = clt.Laminate(self.plydef)
コード例 #16
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def setUp(self):
     mat = TransverseIsotropicPlyMaterial(E11=53780,
                                          E22=17930,
                                          nu12=0.25,
                                          G12=8620,
                                          a11t=6.3e-6,
                                          a22t=20.52e-6,
                                          t=0.127,
                                          F11t=1035,
                                          F11c=1035,
                                          F22t=27.6,
                                          F22c=138,
                                          F12s=41.4)
     sseq = [0] + [90] * 10 + [0]
     self.lam = clt.Laminate([(a, mat) for a in sseq])
     dtemp = 1
     self.sol = self.lam.get_linear_response(
         np.zeros(6),
         dtemp)  #clt.linear_solve(self.lam, np.zeros(6), dtemp)
コード例 #17
0
ファイル: test_clt.py プロジェクト: okoham/composites
class BerthelotExample_14_4_3_1(unittest.TestCase):

    mat3 = TransverseIsotropicPlyMaterial(E11=46000.,
                                          E22=10000.,
                                          G12=4600.,
                                          nu12=0.31,
                                          t=3.)
    mat5 = TransverseIsotropicPlyMaterial(E11=46000.,
                                          E22=10000.,
                                          G12=4600.,
                                          nu12=0.31,
                                          t=5.)
    lam = clt.Laminate([(45, mat3), (0, mat5)])

    expect_qbar45 = 1000 * np.array([[20.481, 11.282, 9.192],
                                     [11.282, 20.482, 9.192],
                                     [9.192, 9.192, 12.716]])

    expect_a = 1000 * np.array([[296.35, 49.676, 27.576],
                                [49.676, 112.51, 27.576],
                                [27.576, 27.576, 61.147]])

    expect_b = 1000 * np.array([[198.75, -60.87, -68.94],
                                [-60.87, -77.01, -68.94],
                                [-68.94, -68.94, -60.87]])

    def test_symm(self):
        self.assertFalse(self.lam.is_symmetric())

    def test_layer_angle(self):
        # second layer, 45
        self.assertEqual(self.lam.layers[0].angle(), math.radians(45))

    def test_qbar45(self):
        layer = self.lam.layers[0]
        assert_allclose(layer.Qbar(), self.expect_qbar45, 1e-4)

    def test_a(self):
        assert_allclose(self.lam.A(), self.expect_a, 1e-4)

    def test_b(self):
        assert_allclose(self.lam.B(), self.expect_b, 1e-4)
コード例 #18
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def setUp(self):
     carbon = TransverseIsotropicPlyMaterial(t=0.04,
                                             E11=207000.,
                                             E22=7600.,
                                             G12=5000.,
                                             nu12=0.3,
                                             a22t=30e-6,
                                             a11t=0,
                                             name="ESDU 94003 Carbon")
     alu = TransverseIsotropicPlyMaterial(t=1.0,
                                          E11=73000.,
                                          E22=73000.,
                                          G12=28100.,
                                          nu12=0.3,
                                          a11t=22e-6,
                                          a22t=22e-6,
                                          name="ESDU 94003 Alu")
     stacking = [(0., carbon), (15., carbon), (0., carbon), (-15., carbon),
                 (0., carbon), (0., alu), (0., carbon), (-15., carbon),
                 (0., carbon), (15., carbon), (0., carbon)]
     self.lam = clt.Laminate(stacking)
コード例 #19
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def setUp(self):
     #
     self.mat = TransverseIsotropicPlyMaterial(name='T300_Epoxy',
                                               E11=135000.,
                                               E22=10000.,
                                               G12=5000.,
                                               nu12=0.27,
                                               nu23=0.30,
                                               a11t=-0.6e-6,
                                               a22t=40.0e-6,
                                               t=0.125,
                                               Xt=1450.,
                                               Xc=1400.,
                                               Yt=55.,
                                               Yc=170.,
                                               Sl=90.)
     #
     self.plydef = [(20., self.mat), (-20., self.mat), (20., self.mat),
                    (-20., self.mat)]
     #
     self.lam = clt.Laminate(self.plydef)
コード例 #20
0
ファイル: test_functions.py プロジェクト: okoham/composites
 def setUp(self):
     self.lam = clt.Laminate([(0, MAT), (90, MAT)])
コード例 #21
0
ファイル: test_functions.py プロジェクト: okoham/composites
 def test_replace_layers(self):
     lam = clt.Laminate([(0, MAT), (90, MAT)])
     newlayers = (clt.Layer(lam, 45, MAT), clt.Layer(lam, -45, MAT))
     self.assertRaises(AttributeError, setattr, lam, 'layers', newlayers)
コード例 #22
0
ファイル: test_functions.py プロジェクト: okoham/composites
 def test_add_layer(self):
     lam = clt.Laminate([(0, MAT), (90, MAT)])
     newlayer = clt.Layer(lam, 45, MAT)
     self.assertRaises(TypeError, tuple.__add__, lam.layers, newlayer)
コード例 #23
0
ファイル: test_functions.py プロジェクト: okoham/composites
 def test_set_illegal_property(self):
     lam = clt.Laminate([(0, MAT), (90, MAT)])
     self.assertRaises(AttributeError, setattr, lam, 'otto', 2000)
コード例 #24
0
ファイル: test_clt.py プロジェクト: okoham/composites
 def test_clt_init(self):
     # mech. load only,
     plydef = [(angle, self.m1) for angle in (0, 90, 0)]
     # plydef is a list of (alpha, t, mat) tuples
     lam = clt.Laminate(plydef)
     self.assertEqual(lam.thickness(), 0.75)
コード例 #25
0
ファイル: test_clt.py プロジェクト: okoham/composites
    def setUp(self):
        """elastic properties: table 3.2, strength values: table 8.3
        thermal and moisture expansion properties: table 4.4
        """
        self.cfrp_t300 = TransverseIsotropicPlyMaterial(
            t=0.125,
            E11=181000.,
            E22=10300.,
            G12=7170.,
            nu12=0.28,
            a11t=0.02e-6,
            a22t=22.5e-6,
            b11m=0.,
            b22m=0.6,
            F11t=1500.,
            F11c=1500.,
            F22t=40.,
            F22c=246.,
            F12s=68.,
            name="CFRP/T300/N5208",
            verbose_name=
            "T300/N5208, from Tsai, Theory of composites design, Tables 3.2, 4.4, 8.3"
        )

        self.bfrp = TransverseIsotropicPlyMaterial(
            t=0.125,
            E11=204000.,
            E22=18500.,
            G12=5590.,
            nu12=0.23,
            a11t=6.1e-6,
            a22t=30.3e-6,
            b11m=0.,
            b22m=0.6,
            F11t=1260.,
            F11c=-2500.,
            F22t=61.,
            F22c=-202.,
            F12s=67.,
            name="BFRP/B(4)/N5505",
            verbose_name=
            "BFRP/B(4)/N5505, from Tsai, Theory of composites design, Table 3.2"
        )

        self.cfrp_as = TransverseIsotropicPlyMaterial(
            t=0.125,
            E11=138000.,
            E22=8960.,
            G12=7100.,
            nu12=0.30,
            a11t=-0.3e-6,
            a22t=28.1e-6,
            b11m=0.,
            b22m=0.44,
            F11t=1447.,
            F11c=-1447.,
            F22t=52.,
            F22c=-206.,
            F12s=93.,
            name="CFRP/AS/3501",
            verbose_name=
            "CFRP/AS/3501, from Tsai, Theory of composites design, Table 3.2")

        self.gfrp = TransverseIsotropicPlyMaterial(
            t=0.125,
            E11=38600.,
            E22=8270.,
            G12=4140.,
            nu12=0.26,
            a11t=8.6e-6,
            a22t=22.1e-6,
            b11m=0.,
            b22m=0.6,
            F11t=1062.,
            F11c=-610.,
            F22t=31.,
            F22c=-118.,
            F12s=72.,
            name="GFRP/E-Glass/Epoxy",
            verbose_name=
            "GFRP/E-Glass/Epoxy, from Tsai, Theory of composites design, Table 3.2"
        )

        self.kfrp = TransverseIsotropicPlyMaterial(
            t=0.125,
            E11=76000.,
            E22=5500.,
            G12=2300.,
            nu12=0.34,
            a11t=-4.0e-6,
            a22t=79.0e-6,
            b11m=0.,
            b22m=0.6,
            F11t=1400.,
            F11c=-235.,
            F22t=12.,
            F22c=-53.,
            F12s=34.,
            name="KFRP/Kev-49/Epoxy",
            verbose_name=
            "KFRP/Kev-49/Epoxy, from Tsai, Theory of composites design, Table 3.2"
        )

        self.cfrtp = TransverseIsotropicPlyMaterial(
            t=0.125,
            E11=134000.,
            E22=8900.,
            G12=5100.,
            nu12=0.28,
            F11t=2130.,
            F11c=-1100.,
            F22t=80.,
            F22c=-200.,
            F12s=160.,
            name="CFRTP/AS4/PEEK",
            verbose_name=
            "CFRTP/AS4/PEEK, from Tsai, Theory of composites design, Table 3.2"
        )

        self.cfrp_im6 = TransverseIsotropicPlyMaterial(
            t=0.125,
            E11=203000.,
            E22=11200.,
            G12=8400.,
            nu12=0.32,
            F11t=3500.,
            F11c=-1540.,
            F22t=56.,
            F22c=-150.,
            F12s=98.,
            name="CFRP/IM6/Epoxy",
            verbose_name=
            "CFRP/IM6/Epoxy, from Tsai, Theory of composites design, Table 3.2"
        )

        self.cfrp_t300_4 = TransverseIsotropicPlyMaterial(
            t=0.1,
            E11=148000.,
            E22=9650.,
            G12=4550.,
            nu12=0.3,
            F11t=1314.,
            F11c=-1200.,
            F22t=43.,
            F22c=-168.,
            F12s=48.,
            name="CFRP/T300/Fbrt_934/4-mil_tp",
            verbose_name=
            "CFRP/T300/Fbrt_934/4-mil_tp, from Tsai, Theory of composites design, Table 3.2"
        )

        self.ccrp_t300_13 = TransverseIsotropicPlyMaterial(
            t=0.325,
            E11=74000.,
            E22=74000.,
            G12=4550.,
            nu12=0.05,
            F11t=499.,
            F11c=-352.,
            F22t=458.,
            F22c=-352.,
            F12s=46.,
            name="CCRP/T300/Fbrt_934/13-mil_c",
            verbose_name=
            "CCRP/T300/Fbrt_934/13-mil_c, from Tsai, Theory of composites design, Table 3.2"
        )

        self.ccrp_t300_7 = TransverseIsotropicPlyMaterial(
            t=0.175,
            E11=66000.,
            E22=66000.,
            G12=4100.,
            nu12=0.04,
            F11t=375.,
            F11c=-279.,
            F22t=368.,
            F22c=-278.,
            F12s=46.,
            name="CCRP/T300/Fbrt_934/7-mil_c",
            verbose_name=
            "CCRP/T300/Fbrt_934/7-mil_c, from Tsai, Theory of composites design, Table 3.2"
        )

        self.lam = clt.Laminate([(0., self.cfrp_t300)])
コード例 #26
0
ファイル: test_functions.py プロジェクト: okoham/composites
 def test_change_laminate_reference(self):
     other_laminate = clt.Laminate([(34, MAT), (42, MAT)])
     layer = self.lam.layers[0]
     self.assertRaises(AttributeError, setattr, layer, '_laminate',
                       other_laminate)