Closed zhyscu closed 3 months ago
What OpenSeesPy and OpsVis versions are installed on your computer?
What OpenSeesPy and OpsVis versions are installed on your computer? the openseespy versions is 3.4.0.5 and the opsvis versions is 1.0.23
opsvis
This issue has been resolved when I updated to the latest version. Thank you.
error when build 3dmodel use ElasticTimoshenkoBeam , the error is: IndexError: index 0 is out of bounds for axis 1 with size 0 ,ax.quiver(xt, yt, zt, g[0, 0], g[0, 1], g[0, 2], color='g', model example is: import openseespy.opensees as ops import opsvis as opsv
import matplotlib.pyplot as plt
ops.wipe()
ops.model('basic', '-ndm', 3, '-ndf', 6)
b = 0.2 h = 0.4
A, Iz, Iy, J = 0.04, 0.0010667, 0.0002667, 0.01172 Avy=0.002 Avz=0.002 E = 25.0e6 G = 9615384.6
Lx, Ly, Lz = 4., 3., 5.
Lx, Ly, Lz = 4., 4., 4.
ops.node(1, 0., 0., 0.) ops.node(2, 0., 0., Lz) ops.node(3, Lx, 0., Lz) ops.node(4, Lx, Ly, Lz)
ops.fix(1, 1, 1, 1, 1, 1, 1)
lmass = 200.
ops.mass(2, lmass, lmass, lmass, 0.001, 0.001, 0.001) ops.mass(3, lmass, lmass, lmass, 0.001, 0.001, 0.001) ops.mass(4, lmass, lmass, lmass, 0.001, 0.001, 0.001)
gTTagz = 1 gTTagx = 2 gTTagy = 3
coordTransf = 'Linear' ops.geomTransf(coordTransf, gTTagz, 0., -1., 0.) ops.geomTransf(coordTransf, gTTagx, 0., -1., 0.) ops.geomTransf(coordTransf, gTTagy, 1., 0., 0.)
ops.element('ElasticTimoshenkoBeam', 1, 1, 2, E, G, A, J, Iy, Iz,Avy,Avz,gTTagz) ops.element('ElasticTimoshenkoBeam', 2, 2, 3, E, G, A, J, Iy, Iz,Avy,Avz,gTTagx) ops.element('ElasticTimoshenkoBeam', 3, 3, 4, E, G, A, J, Iy, Iz,Avy,Avz,gTTagy)
Ew = {}
Px = -4.e1 Py = -2.5e1 Pz = -3.e1
ops.timeSeries('Constant', 1) ops.pattern('Plain', 1, 1) ops.load(4, Px, Py, Pz, 0., 0., 0.)
ops.constraints('Transformation') ops.numberer('RCM') ops.system('BandGeneral') ops.test('NormDispIncr', 1.0e-6, 6, 2) ops.algorithm('Linear') ops.integrator('LoadControl', 1) ops.analysis('Static') ops.analyze(1) sfacN = 1.e-2 sfacVy = 5.e-2 sfacVz = 1.e-2 sfacMy = 1.e-2 sfacMz = 1.e-2 sfacT = 1.e-2
plt.figure()
opsv.section_force_diagram_3d('N', sfacN) plt.title('Axial force N')
opsv.section_force_diagram_3d('Vy', sfacVy) plt.title('Transverse force Vy')
opsv.section_force_diagram_3d('Vz', sfacVz) plt.title('Transverse force Vz')
opsv.section_force_diagram_3d('My', sfacMy) plt.title('Bending moments My')
opsv.section_force_diagram_3d('Mz', sfacMz) plt.title('Bending moments Mz')
opsv.section_force_diagram_3d('T', sfacT) plt.title('Torsional moment T')