Example #1
0
    def test_orient_to_global(self):
        n1 = Node(1, Point(0, 1, 0))
        n2 = Node(2, Point())
        material = LinearMaterial(1, 10)
        sp = TwoNodeSpring2D(1, n1, n2, material, 0, 0)

        true = self.assertTrue
        question = [-1, 0, 0, 1, 0, 0]
        sp.orient_to_global(question, 'pos_origin')
        answer = [0, 1, 0, 0, -1, 0]

        for (q, a) in zip(question, answer):
            true(isclose(q, a))
Example #2
0
 def setUp(self):
     n1 = Node(1, Point())
     n2 = Node(2, Point(3, 4, 0))
     section = Section(1, 1, 1000, 0, 0.1, 0.001, 0, 0)
     self.truss = Truss2D(1, n1, n2, section, 0.1)
Example #3
0
 def setUp(self):
     n1 = Node(1, Point(0.0, 1.0, 0.0))
     n2 = Node(2, Point())
     material = LinearMaterial(1, 10)
     self.spring = TwoNodeRotationSpring2D(1, n1, n2, material, 0, 0)
Example #4
0
 def setUp(self):
     n1 = Node(1, Point())
     n2 = Node(2, Point(1.0, 1.0, 1.0))
     material = LinearMaterial(1, 10)
     self.spring = TwoNodeSpring2D(1, n1, n2, material, 1, 2)
Example #5
0
 def setUp(self):
     n1 = Node(1, Point(0, 1, 0))
     n2 = Node(2, Point())
     material = LinearMaterial(1, 10)
     self.spring = TwoNodeShearSpring2D(1, n1, n2, material, 0, 0, 0.5)
 def setUp(self):
     n1 = Node(1, Point(1, 0, 0))
     n2 = Node(2, Point())
     material = BilinearMaterial(1, 2000, 100, 2)
     self.spring = TwoNodeModifiedCloughSpring2D(1, n1, n2, material, 0, 0)
 def setUp(self):
     n1 = Node(1, Point())
     n2 = Node(2, Point(0, 1, 0))
     n1.restrain()
     material = BilinearMaterial(1, 2000, 100, 2)
     self.spring = TwoNodeModifiedCloughRotationSpring2D(1, n1, n2, material, 1, 1)
Example #8
0
 def setUp(self):
     self.node = Node(1, Point(1, 2, 3))
Example #9
0
 def setUp(self):
     n = Node(1, Point())
     m = LinearMaterial(1, 10)
     self.spring = OneNodeShearSpring2D(1, n, m, 0, 0)
Example #10
0
 def setUp(self):
     n = Node(1, Point())
     m = LinearMaterial(1, 10)
     self.spring = OneNodeAxialSpring2D(1, n, m, 1,2)