I performed an eigen analysis on a 2D elastic beam with fixed BCs. But the results differ significantly from those of abaqus. Is there anything wrong with the following code?
Best regards,
Code: Select all
import openseespy.opensees as ops
import numpy as np
ops.wipe()
# Create model
ops.model('basic', '-ndm', 2, '-ndf', 3)
# define the original nodes
ops.node(1,0,0)
ops.node(2,5,0)
ops.fix(1,1,1,1)
ops.fix(2,1,1,1)
ops.geomTransf('Linear', 1)
rho = 7850
A = 1
E = 2.1e11
Iz = 1
mass = rho*A
eleArgs = ['elasticBeamColumn', A, E, Iz,1, '-mass', mass]
ops.mesh('line', 1, 2, 1, 2, 0, 3, 0.2, *eleArgs)
num_modes = 10
eigenValues = ops.eigen('-fullGenLapack',num_modes) # calculate eigenvalues
freqs = [] # list to store frequencies
for i in range(num_modes):
freq = (eigenValues[i])**0.5/(2*np.pi) # calculate frequencies from eigenvalues
freqs.append([i+1, freq])
freqs = np.array(freqs) # convert freqs to an array