5
5
#
6
6
# ===----------------------------------------------------------------------===//
7
7
#
8
- # Basic Truss Example 1.1
8
+ # Basic Truss
9
9
#
10
10
import veux
11
11
import opensees .openseespy as ops
12
12
13
- # ------------------------------
14
- # Start of model generation
15
- # ------------------------------
16
-
17
13
def create_truss ():
18
14
# Create a Model (with two-dimensions and 2 DOF/node)
19
15
model = ops .Model (ndm = 2 , ndf = 2 )
20
16
21
17
# Create nodes - command: node nodeId xCrd yCrd
22
- model .node (1 , 0.0 , 0.0 )
23
- model .node (2 , 144.0 , 0.0 )
24
- model .node (3 , 168.0 , 0.0 )
25
- model .node (4 , 72.0 , 96.0 )
18
+ model .node (1 , ( 0.0 , 0.0 ) )
19
+ model .node (2 , ( 144.0 , 0.0 ) )
20
+ model .node (3 , ( 168.0 , 0.0 ) )
21
+ model .node (4 , ( 72.0 , 96.0 ) )
26
22
27
23
# set the boundary conditions - command: fix nodeID xRestrnt? yRestrnt?
28
- model .fix (1 , 1 , 1 )
29
- model .fix (2 , 1 , 1 )
30
- model .fix (3 , 1 , 1 )
24
+ model .fix (1 , ( 1 , 1 ) )
25
+ model .fix (2 , ( 1 , 1 ) )
26
+ model .fix (3 , ( 1 , 1 ) )
31
27
32
28
# Define materials for truss elements
33
29
# -----------------------------------
@@ -41,10 +37,6 @@ def create_truss():
41
37
model .element ("Truss" , 2 , (2 , 4 ), 5.0 , 1 )
42
38
model .element ("Truss" , 3 , (3 , 4 ), 5.0 , 1 )
43
39
44
- # Define loads
45
- # ------------
46
- # Define the load at node 4 with components 100 and -50 in x and y;
47
-
48
40
return model
49
41
50
42
if __name__ == "__main__" :
0 commit comments