I modeled the 2D frame with OpenSeesPy in a way that the concrete class is variable, there is a distributed load on the beams and horizontal load on only 2 nodes, I analyzed the statics in this way, but I am getting an error in the analysis part.
My modeling steps are very similar to the OpenSeesPy 2D Portal Frame example:
https://openseespydoc.readthedocs.io/en/stable/src/PortalFrame2d.html
However, while I was doing the analysis using eigen in the example, I did not use eigen. I would like your comments.
import time
import sys
import os
import openseespy.opensees as ops
import numpy as np
import matplotlib.pyplot as plt
m = 1.0
s = 1.0
cm = m/100
mm = m/1000
m2=m*m
cm2=cm*cm
mm2 = mm*mm
kN = 1.0
N = kN/1000
MPa = N/(mm**2)
pi = 3.14
g = 9.81
GPa = 1000*MPa
ton = kN*(s**2)/m
matTag=1
for i in range(0,8):
# remove existing model
ops.wipe()
# set modelbuilder
ops.model('basic', '-ndm', 2, '-ndf', 3)
L_x = 3.0*m # Span
L_y = 3.0*m # Story Height
b=0.3*m
h=0.3*m
# Node Coordinates Matrix (size : nn x 2)
node_coords = np.array([[0, 0], [L_x, 0],
[0, L_y], [L_x, L_y],
[0, 2*L_y], [L_x, 2*L_y],
[0, L_y], [L_x, L_y],
[0, 2*L_y], [L_x, 2*L_y]])
# Element Connectivity Matrix (size: nel x 2)
connectivity = [[1,3], [2,4],
[3,5], [4,6],
[7,8], [9,10],
[7,3], [8,4],
[9,5], [10,6]
]
# Get Number of elements
nel = len(connectivity)
# Distinguish beams, columns & hinges by their element tag ID
all_the_beams = [5, 6]
all_the_cols = [1, 2, 3, 4]
[ops.node(n+1,*node_coords[n])
for n in range(len(node_coords))];
# Boundary Conditions
## Fixing the Base Nodes
[ops.fix(n, 1, 1, 1)
for n in [1, 2]];
fpc = [30,33,36,39,42,45,48,50]
epsc0 = [0.002,0.002,0.002,0.002,0.002,0.002,0.002,0.002]
fpcu = [33,36,39,42,45,48,51,54]
epsU = [0.008,0.0078,0.0075,0.0073,0.0070,0.0068,0.0065,0.0063]
Ec=(3250*(fpc[i]**0.5)+14000)
A=b*h
I=(b*h**3)/12
ops.uniaxialMaterial('Concrete01', matTag, fpc[i], epsc0[i], fpcu[i], epsU[i])
sections = {'Column':{'b':b, 'h':h,'A':A, 'I':I},
'Beam':{'b':300, 'h':500, 'A':300*300,'I':(300*(300**3)/12) }}
# Transformations
ops.geomTransf('Linear', 1)
# Beams
[ops.element('elasticBeamColumn', e, *connectivity[e-1], sections['Beam']['A'], Ec, sections['Beam']['I'], 1)
for e in all_the_beams];
# Columns
[ops.element('elasticBeamColumn', e, *connectivity[e-1], sections['Column']['A'], Ec, sections['Column']['I'], 1)
for e in all_the_cols];
D_L = 0.27*(kN/m) # Distributed load
C_L = 0.27*(kN) # Concentrated load
# Now, loads & lumped masses will be added to the domain.
loaded_nodes = [3,5]
loaded_elems = [5,6]
ops.timeSeries('Linear',1,'-factor',1.0)
ops.pattern('Plain', 1, 1)
[ops.load(n, *[0,-C_L,0]) for n in loaded_nodes];
ops.eleLoad('-ele', *loaded_elems,'-type', '-beamUniform',-D_L)
# create SOE
ops.system("BandSPD")
# create DOF number
ops.numberer("RCM")
# create constraint handler
ops.constraints("Plain")
# create integrator
ops.integrator("LoadControl", 1.0)
# create algorithm
ops.algorithm("Linear")
# create analysis object
ops.analysis("Static")
# perform the analysis
ops.analyze(1)
# get node displacements
ux = ops.nodeDisp(5, 1)
uy = ops.nodeDisp(3, 1)
print(ux,uy)
print('Model built successfully!')