Esempio n. 1
0
def test_lb_Stiffener2D():
    print('Testing linear buckling for StiffPanelBay with a 2D Stiffener')
    spb = StiffPanelBay()
    spb.a = 1.
    spb.b = 0.5
    spb.stack = [0, 90, 90, 0]
    spb.plyt = 1e-3*0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.mu = 1.3e3
    spb.m = 15
    spb.n = 16

    spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt, Nxx=-1.)
    spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt, Nxx_cte=1000.)

    spb.add_bladestiff2d(ys=spb.b/2., m1=14, n1=11, bf=0.05,
                        fstack=[0, 90, 90, 0],
                        fplyt=spb.plyt, flaminaprop=spb.laminaprop)

    k0 = spb.calc_k0(silent=True)
    kG = spb.calc_kG0(silent=True)
    eigvals, eigvecs = lb(k0, kG, silent=True)

    assert np.isclose(eigvals[0].real, 301.0825234, atol=0.1, rtol=0)
Esempio n. 2
0
def test_lb_Stiffener2D():
    print('Testing linear buckling for StiffPanelBay with a 2D Stiffener')
    spb = StiffPanelBay()
    spb.a = 1.
    spb.b = 0.5
    spb.stack = [0, 90, 90, 0]
    spb.plyt = 1e-3 * 0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.mu = 1.3e3
    spb.m = 15
    spb.n = 16

    spb.add_panel(y1=0, y2=spb.b / 2., plyt=spb.plyt, Nxx=-1.)
    spb.add_panel(y1=spb.b / 2., y2=spb.b, plyt=spb.plyt, Nxx_cte=1000.)

    spb.add_bladestiff2d(ys=spb.b / 2.,
                         m1=14,
                         n1=11,
                         bf=0.05,
                         fstack=[0, 90, 90, 0],
                         fplyt=spb.plyt,
                         flaminaprop=spb.laminaprop)

    k0 = spb.calc_k0(silent=True)
    kG = spb.calc_kG0(silent=True)
    eigvals, eigvecs = lb(k0, kG, silent=True)

    assert np.isclose(eigvals[0].real, 301.0825234, atol=0.1, rtol=0)
Esempio n. 3
0
def test_freq_Stiffener2D():
    print('Testing frequency analysis for StiffPanelBay with a 2D Stiffener')
    spb = StiffPanelBay()
    spb.a = 1.
    spb.b = 0.5
    spb.stack = [0, 90, 90, 0]
    spb.plyt = 1e-3*0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.mu = 1.3e3
    spb.m = 11
    spb.n = 12

    spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt)
    spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt)

    spb.add_bladestiff2d(ys=spb.b/2., m1=14, n1=11, bf=0.08,
                        fstack=[0, 90, 90, 0]*5, fplyt=spb.plyt,
                        flaminaprop=spb.laminaprop)

    k0 = spb.calc_k0(silent=True)
    M = spb.calc_kM(silent=True)
    eigvals, eigvecs = freq(k0, M, silent=True)

    assert np.isclose(eigvals[0].real, 137.97927190657148, atol=0.01, rtol=0)
Esempio n. 4
0
def test_freq_Stiffener2D():
    print('Testing frequency analysis for StiffPanelBay with a 2D Stiffener')
    spb = StiffPanelBay()
    spb.a = 1.
    spb.b = 0.5
    spb.stack = [0, 90, 90, 0]
    spb.plyt = 1e-3 * 0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.mu = 1.3e3
    spb.m = 11
    spb.n = 12

    spb.add_panel(y1=0, y2=spb.b / 2., plyt=spb.plyt)
    spb.add_panel(y1=spb.b / 2., y2=spb.b, plyt=spb.plyt)

    spb.add_bladestiff2d(ys=spb.b / 2.,
                         m1=14,
                         n1=11,
                         bf=0.08,
                         fstack=[0, 90, 90, 0] * 5,
                         fplyt=spb.plyt,
                         flaminaprop=spb.laminaprop)

    k0 = spb.calc_k0(silent=True)
    M = spb.calc_kM(silent=True)
    eigvals, eigvecs = freq(k0, M, silent=True)

    assert np.isclose(eigvals[0].real, 137.97927190657148, atol=0.01, rtol=0)
def test_dynamic_with_BladeStiff2D():
    print('Testing dynamic analysis with TStiff2D')
    spb = StiffPanelBay()
    spb.a = 2.
    spb.b = 1.
    spb.stack = [0, 90, 90, 0]
    spb.plyt = 1e-3*0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.m = 10
    spb.n = 10
    spb.mu = 1.3e3

    spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt)
    spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt)

    bb = spb.b/5.
    bf = bb
    stiff = spb.add_bladestiff2d(ys=spb.b/2., bf=bf, bb=bb,
                     fstack=[0, 90, 90, 0]*2,
                     fplyt=spb.plyt*1., flaminaprop=spb.laminaprop,
                     bstack=[0, 90, 90, 0]*1,
                     bplyt=spb.plyt*1., blaminaprop=spb.laminaprop,
                     mf=10, nf=10)

    k0 = spb.calc_k0()
    M = spb.calc_kM()
    eigvals, eigvecs = freq(k0, M, silent=True)

    spb.plot_skin(eigvecs[:, 0], filename='tmp_test_bladestiff2d_dynamic_skin.png',
            colorbar=True)
    spb.plot_stiffener(eigvecs[:, 0], si=0, region='flange',
            filename='tmp_test_bladestiff2d_dynamic_stiff_flange.png', colorbar=True)

    assert np.isclose(eigvals[0], 25.865835238236173, atol=0.01, rtol=0.001)
def test_static_with_BladeStiff2D():
    print('Testing linear statics with BladeStiff2D')

    spb = StiffPanelBay()
    spb.a = 2.
    spb.b = 1.
    spb.m = 12
    spb.n = 13
    spb.stack = [0, +45, -45, 90, -45, +45, 0]
    spb.plyt = 1e-3 * 0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)

    spb.add_panel(y1=0, y2=spb.b / 2., plyt=spb.plyt)
    spb.add_panel(y1=spb.b / 2., y2=spb.b, plyt=spb.plyt)

    bb = spb.b / 5.
    bf = bb
    stiff = spb.add_bladestiff2d(ys=spb.b / 2.,
                                 bf=bf,
                                 bb=bb,
                                 fstack=[0, 90, 90, 0] * 8,
                                 fplyt=spb.plyt * 1.,
                                 flaminaprop=spb.laminaprop,
                                 bstack=[0, 90, 90, 0] * 4,
                                 bplyt=spb.plyt * 1.,
                                 blaminaprop=spb.laminaprop,
                                 mf=17,
                                 nf=16)
    stiff.flange.forces.append(
        [stiff.flange.a / 2., stiff.flange.b, 0., 0., 1000.])

    spb.calc_k0()
    fext = spb.calc_fext()
    inc, cs = static(spb.k0, fext, silent=True)

    wpanelmin = spb.uvw_skin(cs[0])[2].min()
    #NOTE repeated call on purpose to evaluate if cs[0] is being messed up
    #     somewhere
    wpanelmin = spb.uvw_skin(cs[0])[2].min()
    wflangemax = spb.uvw_stiffener(cs[0], 0, region='flange')[2].max()
    #NOTE repeated call on purpose
    wflangemax = spb.uvw_stiffener(cs[0], 0, region='flange')[2].max()
    assert np.isclose(wpanelmin, -0.30581458201781481, atol=1.e-4, rtol=0.001)
    assert np.isclose(wflangemax, 0.331155797371884, atol=1.e-4, rtol=0.001)
    spb.plot_skin(cs[0],
                  filename='tmp_test_bladestiff2d_static_skin.png',
                  colorbar=True,
                  vec='w',
                  clean=False)
    spb.plot_stiffener(
        cs[0],
        si=0,
        region='flange',
        filename='tmp_test_bladestiff2d_stiff_static_flange.png',
        colorbar=True,
        clean=False)
Esempio n. 7
0
def test_bladestiff2d_lb():
    print('Testing linear buckling with BladeStiff2D')

    spb = StiffPanelBay()
    spb.a = 2.
    spb.b = 1.
    spb.stack = [0, +45, -45, 90, -45, +45]
    spb.plyt = 1e-3 * 0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.m = 17
    spb.n = 16

    Nxx = -50.
    spb.add_panel(y1=0, y2=spb.b / 2., plyt=spb.plyt, Nxx=Nxx)
    spb.add_panel(y1=spb.b / 2., y2=spb.b, plyt=spb.plyt, Nxx=Nxx)

    bb = spb.b / 5.
    bf = bb
    stiff = spb.add_bladestiff2d(ys=spb.b / 2.,
                                 bf=bf,
                                 bb=bb,
                                 fstack=[0, 90, 90, 0] * 8,
                                 fplyt=spb.plyt * 1.,
                                 flaminaprop=spb.laminaprop,
                                 bstack=[0, 90, 90, 0] * 4,
                                 bplyt=spb.plyt * 1.,
                                 blaminaprop=spb.laminaprop,
                                 mf=17,
                                 nf=16)

    spb.calc_k0()
    spb.calc_kG0()
    eigvals, eigvecs = lb(spb.k0, spb.kG0, silent=True)

    spb.plot_skin(eigvecs[:, 0],
                  filename='tmp_test_bladestiff2d_lb_skin.png',
                  colorbar=True)
    spb.plot_stiffener(eigvecs[:, 0],
                       si=0,
                       region='flange',
                       filename='tmp_test_bladestiff2d_lb_stiff_flange.png',
                       colorbar=True)

    calc = eigvals[0] * Nxx

    spb.plot_skin(eigvecs[:, 0],
                  filename='tmp_test_bladestiff2d_lb_skin.png',
                  colorbar=True,
                  vec='w',
                  clean=False)
    assert np.isclose(calc, -759.05689868085778, atol=0.0001, rtol=0.001)
def test_freq_Stiffener2D():
    print('Testing frequency analysis for StiffPanelBay with a 2D Stiffener')
    spb = StiffPanelBay()
    spb.a = 1.
    spb.b = 0.5
    spb.stack = [0, 90, 90, 0]
    spb.plyt = 1e-3*0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.mu = 1.3e3
    spb.m = 11
    spb.n = 12

    spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt)
    spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt)

    spb.add_bladestiff2d(ys=spb.b/2., m1=14, n1=11, bf=0.08,
                        fstack=[0, 90, 90, 0]*5, fplyt=spb.plyt,
                        flaminaprop=spb.laminaprop)

    spb.freq(silent=True, atype=4)

    assert np.isclose(spb.eigvals[0].real, 138.51917530043477)
Esempio n. 9
0
def test_dynamic_with_BladeStiff2D():
    print('Testing dynamic analysis with TStiff2D')
    spb = StiffPanelBay()
    spb.a = 2.
    spb.b = 1.
    spb.stack = [0, 90, 90, 0]
    spb.plyt = 1e-3 * 0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
    spb.model = 'plate_clt_donnell_bardell'
    spb.m = 10
    spb.n = 10
    spb.mu = 1.3e3

    spb.add_panel(y1=0, y2=spb.b / 2., plyt=spb.plyt)
    spb.add_panel(y1=spb.b / 2., y2=spb.b, plyt=spb.plyt)

    bb = spb.b / 5.
    bf = bb
    stiff = spb.add_bladestiff2d(ys=spb.b / 2.,
                                 bf=bf,
                                 bb=bb,
                                 fstack=[0, 90, 90, 0] * 2,
                                 fplyt=spb.plyt * 1.,
                                 flaminaprop=spb.laminaprop,
                                 bstack=[0, 90, 90, 0] * 1,
                                 bplyt=spb.plyt * 1.,
                                 blaminaprop=spb.laminaprop,
                                 mf=10,
                                 nf=10)

    k0 = spb.calc_k0()
    M = spb.calc_kM()
    eigvals, eigvecs = freq(k0, M, silent=True)

    spb.plot_skin(eigvecs[:, 0],
                  filename='tmp_test_bladestiff2d_dynamic_skin.png',
                  colorbar=True)
    spb.plot_stiffener(
        eigvecs[:, 0],
        si=0,
        region='flange',
        filename='tmp_test_bladestiff2d_dynamic_stiff_flange.png',
        colorbar=True)

    assert np.isclose(eigvals[0], 25.865835238236173, atol=0.01, rtol=0.001)
def test_static_with_BladeStiff2D():
    print('Testing linear statics with BladeStiff2D')

    spb = StiffPanelBay()
    spb.a = 2.
    spb.b = 1.
    spb.m = 12
    spb.n = 13
    spb.stack = [0, +45, -45, 90, -45, +45, 0]
    spb.plyt = 1e-3*0.125
    spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)

    spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt)
    spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt)

    bb = spb.b/5.
    bf = bb
    stiff = spb.add_bladestiff2d(ys=spb.b/2., bf=bf, bb=bb,
                     fstack=[0, 90, 90, 0]*8,
                     fplyt=spb.plyt*1., flaminaprop=spb.laminaprop,
                     bstack=[0, 90, 90, 0]*4,
                     bplyt=spb.plyt*1., blaminaprop=spb.laminaprop,
                     mf=17, nf=16)
    stiff.flange.forces.append([stiff.flange.a/2., stiff.flange.b, 0., 0., 1000.])

    spb.calc_k0()
    fext = spb.calc_fext()
    inc, cs = static(spb.k0, fext, silent=True)

    wpanelmin = spb.uvw_skin(cs[0])[2].min()
    #NOTE repeated call on purpose to evaluate if cs[0] is being messed up
    #     somewhere
    wpanelmin = spb.uvw_skin(cs[0])[2].min()
    wflangemax = spb.uvw_stiffener(cs[0], 0, region='flange')[2].max()
    #NOTE repeated call on purpose
    wflangemax = spb.uvw_stiffener(cs[0], 0, region='flange')[2].max()
    assert np.isclose(wpanelmin, -0.30581458201781481, atol=1.e-4, rtol=0.001)
    assert np.isclose(wflangemax, 0.331155797371884, atol=1.e-4, rtol=0.001)
    spb.plot_skin(cs[0], filename='tmp_test_bladestiff2d_static_skin.png', colorbar=True, vec='w', clean=False)
    spb.plot_stiffener(cs[0], si=0, region='flange',
            filename='tmp_test_bladestiff2d_stiff_static_flange.png', colorbar=True, clean=False)