Skip to content

Commit ab81002

Browse files
committed
add loads - wrong
1 parent 82070ca commit ab81002

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

examples/paz_5_1.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def rotx(angleindegrees):
2424
m = model.create(3)
2525

2626
model.add_joint(m, 1, [0.0, 0.0, 0.0])
27+
model.add_joint(m, 12, [-L / 2, 0.0, 0.0])
2728
model.add_joint(m, 2, [-L, 0.0, 0.0])
2829
model.add_joint(m, 3, [0.0, -L, 0.0])
2930
model.add_joint(m, 4, [0.0, 0.0, +L])
@@ -32,10 +33,11 @@ def rotx(angleindegrees):
3233
model.add_support(m["joints"][2], model.CLAMPED)
3334
model.add_support(m["joints"][3], model.CLAMPED)
3435
model.add_support(m["joints"][4], model.CLAMPED)
36+
model.add_support(m["joints"][5], model.CLAMPED)
3537

3638
# Member 1, 2: W18x130
3739
A, Ix, Iy, Iz, J = section.i_beam(19.3, 11.2, 1.2, 0.67)
38-
xz_vector = dot(rotx(-30), array([0, 0, 1]))
40+
xz_vector = dot(rotx(-30), array([0, 1, 0]))
3941
sect_1 = section.beam_3d_section(
4042
"sect_1", E=E, G=G, A=A, Ix=Ix, Iy=Iy, Iz=Iz, J=J, xz_vector=xz_vector
4143
)
@@ -58,13 +60,17 @@ def rotx(angleindegrees):
5860
"sect_4", E=E, G=G, A=A, Ix=Ix, Iy=Iy, Iz=Iz, J=J, xz_vector=xz_vector
5961
)
6062

61-
model.add_beam_member(m, 1, [1, 2], sect_1)
63+
model.add_beam_member(m, 1, [1, 12], sect_1)
64+
model.add_beam_member(m, 12, [12, 2], sect_1)
6265
model.add_beam_member(m, 2, [1, 3], sect_2)
6366
model.add_beam_member(m, 3, [1, 4], sect_3)
6467
model.add_beam_member(m, 4, [1, 5], sect_4)
6568

6669

67-
model.add_load(m["joints"][1], model.U3, -5e3 - 7.5e3)
70+
model.add_load(m["joints"][1], model.U1, 1000)
71+
model.add_load(m["joints"][12], model.UR2, 500)
72+
model.add_load(m["joints"][1], model.U3, -2 * L / 2)
73+
model.add_load(m["joints"][1], model.UR1, 2 * L**2 / 12)
6874

6975
model.number_dofs(m)
7076

@@ -90,7 +96,8 @@ def rotx(angleindegrees):
9096

9197
# print("Displacement calculation OK")
9298

93-
# print('Reference: ', [-0.02238452, 0.00419677, 0.00593197])
99+
print("Displacements: ", m["joints"][1]["displacements"])
100+
print("Reference: ", [0.1865, 0.0316, -0.028, 3.095e-3, -9.256e-3, -0.0275])
94101

95102
plots.plot_setup(m)
96103
plots.plot_members(m)
@@ -99,7 +106,7 @@ def rotx(angleindegrees):
99106

100107
plots.plot_setup(m)
101108
plots.plot_members(m)
102-
plots.plot_deformations(m, 10.0)
109+
plots.plot_deformations(m, 100.0)
103110
# ax = plots.plot_shear_forces(m, scale=0.50e-3)
104111
# ax.set_title('Shear forces')
105112
plots.show(m)

0 commit comments

Comments
 (0)