Hi Everyone,
When I apply a horizontal load of 270 N to the upper end of a column with a lower end fixed and upper end free with OpenSeesPy, I want to output the displacements at this end and the base shear force for this column in both directions, but I get the Lapack error. According to my research, the Lacpack error is related to connection points, it is caused by the element not being able to connect to points. However, there is a problem in my codes that I cannot see. Can you help me?
Note: The top point of the column is in a for loop and the column length increases by 0.1 * 3 between 3 meters and 5 meters. I'm trying to read this data for all sizes that fall within this range.
Codes:
from IPython.testing import test
#CASE 1.1.1.
from numpy.lib.npyio import load
from openseespy.opensees import *
import numpy as np
import matplotlib.pyplot as plt
# Material properties
matTag = 1
E = 30000.0
A = 1.0
# Starting length and increment
Li = 3.0
L_final = 5.0
increment = 0.1 * Li
# Lists to store outputs
lengths = []
horizontal_reactions = []
displacement_x = []
displacement_y = []
def analys():
# Start of analysis generation
# create SOE
system("BandSPD")
# create DOF number
numberer("RCM")
# create constraint handler
constraints("Plain")
# create integrator
integrator("LoadControl", 1.0)
# create algorithm
algorithm("Linear")
# create analysis object
analysis("Static")
# perform the analysis
analyze(1)
for L in np.arange(Li, L_final + increment, increment):
# remove existing model
wipe()
# set modelbuilder
model('basic', '-ndm', 2, '-ndf', 3)
uniaxialMaterial("Elastic", matTag, E)
node(1, 0.0, 0.0); fix(1, 1, 1, 1)
# create nodes
node(2, 0.0, L); fix(2, 0, 0, 0)
# define elements
element("Truss", 1, 1, 2, A, matTag)
# create TimeSeries
timeSeries("Constant", 1,1,1)
# create a plain load pattern
pattern("Plain", 1, 1)
# Create the nodal load - command: load nodeID xForce yForce
load(2, 270.0, 100.0, 0.0)
analys()
# get node displacements
ux = nodeDisp(2, 1)
uy = nodeDisp(2, 2)
# get reactions at the fixed node
rx = nodeReaction(1, 1)
# Save outputs
lengths.append(L)
horizontal_reactions.append(rx)
displacement_x.append(ux)
displacement_y.append(uy)
print(displacement_x)
print(displacement_y)
print(horizontal_reactions)