Skip to content

Commit 5d6e8bb

Browse files
cmp
1 parent f9d6e03 commit 5d6e8bb

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

content/en/examples/Example1/truss.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,25 @@
55
#
66
# ===----------------------------------------------------------------------===//
77
#
8-
# Basic Truss Example 1.1
8+
# Basic Truss
99
#
1010
import veux
1111
import opensees.openseespy as ops
1212

13-
# ------------------------------
14-
# Start of model generation
15-
# ------------------------------
16-
1713
def create_truss():
1814
# Create a Model (with two-dimensions and 2 DOF/node)
1915
model = ops.Model(ndm=2, ndf=2)
2016

2117
# 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))
2622

2723
# 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))
3127

3228
# Define materials for truss elements
3329
# -----------------------------------
@@ -41,10 +37,6 @@ def create_truss():
4137
model.element("Truss", 2, (2, 4), 5.0, 1)
4238
model.element("Truss", 3, (3, 4), 5.0, 1)
4339

44-
# Define loads
45-
# ------------
46-
# Define the load at node 4 with components 100 and -50 in x and y;
47-
4840
return model
4941

5042
if __name__ == "__main__":

0 commit comments

Comments
 (0)