예제 #1
0
def test_panel_fkG_num_Fnxny():
    for model in ['plate_clt_donnell_bardell', 'cpanel_clt_donnell_bardell']:
        print('Checking fkG_num for model {0}'.format(model))
        # ssss
        p = Panel()
        p.a = 8.
        p.b = 4.
        p.r = 1.e8
        p.stack = [0, 90, 90, 0, -45, +45]
        p.plyt = 1e-3 * 0.125
        p.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
        p.model = model

        p.Nxx = -1.

        p.m = 8
        p.n = 9

        p.u1ty = 1
        p.u2ty = 1
        p.u2tx = 1

        p.v1tx = 0
        p.v2tx = 1
        p.v1ty = 1
        p.v2ty = 1

        num = 1000.
        f = 0.
        for i in range(int(num)):
            if i == 0 or i == num - 2:
                fx = p.Nxx * p.b / (num - 1.) / 2.
            else:
                fx = p.Nxx * p.b / (num - 1.)
            p.add_force(x=p.a,
                        y=i * p.b / (num - 1.),
                        fx=fx,
                        fy=0.,
                        fz=0.,
                        cte=True)
            f += fx

        p.static(silent=True)
        c = p.analysis.cs[0]

        p.lb(silent=True)
        assert np.isclose(p.eigvals[0], 4.5290911349518801, atol=0.01, rtol=0)

        nx = 9
        ny = 9
        Fnxny = p.F
        p.lb(silent=True, c=c, Fnxny=Fnxny, nx=nx, ny=ny)
        assert np.isclose(p.eigvals[0], 4.532851973656947, atol=0.01, rtol=0)

        nx = 12
        ny = 10
        Fnxny = np.array([[p.F] * ny] * nx)
        p.lb(silent=True, c=c, Fnxny=Fnxny, nx=nx, ny=ny)
        assert np.isclose(p.eigvals[0], 4.532851973656947, atol=0.01, rtol=0)
예제 #2
0
def test_panel_fkG_num_Fnxny():
    for model in ['plate_clt_donnell_bardell',
                  'cpanel_clt_donnell_bardell']:
        print('Checking fkG_num for model {0}'.format(model))
        # ssss
        p = Panel()
        p.a = 8.
        p.b = 4.
        p.r = 1.e8
        p.stack = [0, 90, 90, 0, -45, +45]
        p.plyt = 1e-3*0.125
        p.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
        p.model = model

        p.Nxx = -1.

        p.m = 8
        p.n = 9

        p.u1ty = 1
        p.u2ty = 1
        p.u2tx = 1

        p.v1tx = 0
        p.v2tx = 1
        p.v1ty = 1
        p.v2ty = 1

        num = 1000.
        f = 0.
        for i in range(int(num)):
            if i == 0 or i == num - 2:
                fx = p.Nxx*p.b/(num-1.)/2.
            else:
                fx = p.Nxx*p.b/(num-1.)
            p.add_force(x=p.a, y=i*p.b/(num-1.), fx=fx, fy=0., fz=0.,
                        cte=True)
            f += fx

        p.static(silent=True)
        c = p.analysis.cs[0]

        p.lb(silent=True)
        assert np.isclose(p.eigvals[0], 4.5290911349518801, atol=0.01, rtol=0)

        nx = 9
        ny = 9
        Fnxny = p.F
        p.lb(silent=True, c=c, Fnxny=Fnxny, nx=nx, ny=ny)
        assert np.isclose(p.eigvals[0], 4.532851973656947, atol=0.01, rtol=0)

        nx = 12
        ny = 10
        Fnxny = np.array([[p.F]*ny]*nx)
        p.lb(silent=True, c=c, Fnxny=Fnxny, nx=nx, ny=ny)
        assert np.isclose(p.eigvals[0], 4.532851973656947, atol=0.01, rtol=0)
예제 #3
0
def test_panel_field_outputs():
    m = 7
    n = 6
    #TODO implement for conical panels
    strain_field = dict(exx=None, eyy=None, gxy=None, kxx=None, kyy=None, kxy=None)
    stress_field = dict(Nxx=None, Nyy=None, Nxy=None, Mxx=None, Myy=None, Mxy=None)
    for model in ['plate_clt_donnell_bardell',
                  'cpanel_clt_donnell_bardell']:
        p = Panel()
        p.model = model
        p.u1tx = 1
        p.u1ty = 1
        p.u2ty = 1
        p.v1tx = 0
        p.v2tx = 0
        p.v1ty = 0
        p.v2ty = 0

        p.a = 2.
        p.b = 1.
        p.r = 1.e5
        p.stack = [0, -45, +45, 90, +45, -45, 0, 0]
        p.plyt = 1e-3*0.125
        p.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
        p.nx = m
        p.ny = n
        p.m = m
        p.n = n

        P = 1000.
        npts = 100
        p.forces_inc = []
        for y in np.linspace(0, p.b, npts):
            p.forces_inc.append([0., y, P/(npts-1.), 0, 0])
        p.forces_inc[0][2] /= 2.
        p.forces_inc[-1][2] /= 2.

        p.static()
        c = p.analysis.cs[0]
        Ns = p.stress(c, gridx=50, gridy=50)
        es = p.strain(c, gridx=50, gridy=50)
        for k, v in strain_field.items():
            if v is None:
                strain_field[k] = es.get(k).min()
            else:
                assert np.isclose(strain_field[k], es.get(k).min(), rtol=0.05)
            p.plot(c, vec=k, filename='tmp_test_panel_strain_field_%s.png' % k)
        for k, v in stress_field.items():
            if v is None:
                stress_field[k] = Ns.get(k).min()
            else:
                assert np.isclose(stress_field[k], Ns.get(k).min(), rtol=0.05)
            p.plot(c, vec=k, filename='tmp_test_panel_stress_field_%s.png' % k)
예제 #4
0
def test_fint():
    m = 6
    n = 6
    for model in ['plate_clt_donnell_bardell',
                  'cpanel_clt_donnell_bardell'
                  ]:
        p = Panel()
        p.model = model
        p.w1tx = 0
        p.w1rx = 1
        p.u1tx = 1
        p.u1ty = 1
        p.u2ty = 1
        p.a = 2.
        p.b = 1.
        p.r = 1.e5
        p.stack = [0, 90, -45, +45]
        p.plyt = 1e-3*0.125
        p.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
        p.nx = m
        p.ny = n
        p.m = m
        p.n = n

        P = 1000.
        npts = 100
        p.forces_inc = []
        for y in np.linspace(0, p.b, npts):
            p.forces_inc.append([0., y, P/(npts-1.), 0, 0])
        p.forces_inc[0][2] /= 2.
        p.forces_inc[-1][2] /= 2.
        p.forces.append([p.a/2., p.b/2., 0, 0, 0.001])

        p.static(NLgeom=True, silent=True)
        c = p.analysis.cs[0]
        p.plot(c, vec='w', filename='tmp_test_non_linear.png', colorbar=True)


        p.uvw(p.analysis.cs[0])
        assert np.isclose(p.w.max(), 0.000144768080125, rtol=0.001)
예제 #5
0
def test_fint():
    m = 6
    n = 6
    for model in ['plate_clt_donnell_bardell', 'cpanel_clt_donnell_bardell']:
        p = Panel()
        p.model = model
        p.w1tx = 0
        p.w1rx = 1
        p.u1tx = 1
        p.u1ty = 1
        p.u2ty = 1
        p.a = 2.
        p.b = 1.
        p.r = 1.e5
        p.stack = [0, 90, -45, +45]
        p.plyt = 1e-3 * 0.125
        p.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
        p.nx = m
        p.ny = n
        p.m = m
        p.n = n

        P = 1000.
        npts = 100
        p.forces_inc = []
        for y in np.linspace(0, p.b, npts):
            p.forces_inc.append([0., y, P / (npts - 1.), 0, 0])
        p.forces_inc[0][2] /= 2.
        p.forces_inc[-1][2] /= 2.
        p.forces.append([p.a / 2., p.b / 2., 0, 0, 0.001])

        p.static(NLgeom=True, silent=True)
        c = p.analysis.cs[0]
        p.plot(c, vec='w', filename='tmp_test_non_linear.png', colorbar=True)

        p.uvw(p.analysis.cs[0])
        assert np.isclose(p.w.max(), 0.000144768080125, rtol=0.001)