def test_interal_torque(self):
        # NB minus sign because convention for applied_stress is that
        # stiffness loads are positive.
        h = Hinge('hinge', [0, 0, 1])

        # Constant loading
        h.internal_torque = 3.4
        h.calc_external_loading()
        assert_array_equal(h.applied_forces, 0)
        assert_array_equal(h.applied_stress, [-3.4])

        # Loading function
        h.internal_torque = lambda element, t: 5.4
        h.calc_external_loading()
        assert_array_equal(h.applied_forces, 0)
        assert_array_equal(h.applied_stress, [-5.4])
示例#2
0
    def test_interal_torque(self):
        # NB minus sign because convention for applied_stress is that
        # stiffness loads are positive.
        h = Hinge('hinge', [0, 0, 1])

        # Constant loading
        h.internal_torque = 3.4
        h.calc_external_loading()
        assert_array_equal(h.applied_forces, 0)
        assert_array_equal(h.applied_stress, [-3.4])

        # Loading function
        h.internal_torque = lambda element, t: 5.4
        h.calc_external_loading()
        assert_array_equal(h.applied_forces, 0)
        assert_array_equal(h.applied_stress, [-5.4])