Im creating a model to perform time history analysis of MDOF. I want to apply gravity first and here is the partial python code. it keeps raising error. Could anyone help me? thank you so much
numstory = 9
w = 2200 # weight
k = 1600
h = 1440 # total height
g = 386.1
b = 1800
d = 1800
bw = 2000
sM = 1 * pow(10, -3) # floor rotational mass
# nodal coordinates:
ops.node(1, 0, 0, 0) # node , X Y
# Single point constraints -- Boundary Conditions
ops.fix(1, 1, 1, 1, 1, 1, 1) # node DX DY RZ
for i in range (2, numstory + 2, 1): # here we are modelling 9 floors in total
ops.node(i, 0, 0, (i - 1) * (h / numstory))
ops.fix(i, 0, 0, 1, 1, 1, 0)
ops.mass(i, w / g, w / g, w / g, sM, sM, sM)
# Define ELEMENTS -------------------------------------------------------------
ops.geomTransf('PDelta', 1, 0, 1, 0) # associate a tag to transformation
E = 29000
A = d * b
I = k * (h / numstory) * (h / numstory) * (h / numstory) / (12 * E)
G = 1 * pow(10, 4)
J = 1 * pow(10,
![Cool 8)](./images/smilies/icon_cool.gif)
ColMatTagAxial = 1
EACol = E * A
ops.uniaxialMaterial('ModIMKPeakOriented', ColMatTagAxial, k, 0.01, 0.01, 600, -600, 1,
1, 1, 1, 1, 1, 1, 1, 0.02, 0.02, 0.02,
0.02, 0.3, 0.3, 0.3, 0.3, 1, 1)
# ('ModIMKPeakOriented', matTag, K0, as_Plus, as_Neg, My_Plus, My_Neg, Lamda_S,
# Lamda_C, Lamda_A, Lamda_K, c_S, c_C, c_A, c_K, theta_p_Plus, theta_p_Neg, theta_pc_Plus,
# theta_pc_Neg, Res_Pos, Res_Neg, theta_u_Plus, theta_u_Neg, D_Plus, D_Neg)
# this is an axial-force-strain response
ops.section('Uniaxial', 1, ColMatTagAxial,'P')
# element elasticBeamColumn eleTag iNode jNode A E Iz transfTag
for i in range (1, numstory + 1):
if i != numstory+1:
ops.element('nonlinearBeamColumn', i, i, i + 1, 5, 1, 1)
# element('nonlinearBeamColumn', eleTag, *eleNodes, numIntgrPts, secTag, transfTag,
# '-iter', maxIter=10, tol=1e-12, '-mass', mass=0.0, '-integration', intType)
# Define RECORDERS -------------------------------------------------------------
ops.recorder('Node', '-file', 'Data/DFree.out', '-time', '-node', 2, '-dof', 1, 2, 3,
'disp') # displacements of free nodes
ops.recorder('Node', '-file', 'Data/DBase.out', '-time', '-node', 1, '-dof', 1, 2, 3,
'disp') # displacements of support nodes
ops.recorder('Node', '-file', 'Data/RBase.out', '-time', '-node', 1, '-dof', 1, 2, 3,
'reaction') # support reaction
ops.recorder('Element', '-file', 'Data/FCol.out', '-time', '-ele', 2, 'globalForce') # element forces -- column
ops.recorder('Element', '-file', 'Data/ForceColSec1.out', '-time', '-ele', 1, 'section', 1,
'force') # Column section forces, axial and moment, node i
ops.recorder('Element', '-file', 'Data/DefoColSec1.out', '-time', '-ele', 1, 'section', 1,
'deformation') # section deformations, axial and curvature, node i
# -----------------------------------------------------------------------------------
# define GRAVITY -------------------------------------------------------------
ops.timeSeries('Linear', 1) # timeSeries Linear 1;
# define Load Pattern
ops.pattern('Plain', 1, 1)
for i in range (2, 10, 1):
ops.load(1, 0, 0, -1 * w/9, 0, 0, 0)
# ------------------------------------------------- apply gravity load
Tol = 1.0e-8
ops.wipeAnalysis()
ops.constraints('Plain')
ops.numberer('RCM')
ops.system('ProfileSPD')
ops.test('NormDispIncr', Tol, 6)
ops.algorithm('Newton')
NstepGravity = 10
DGravity = 1. / NstepGravity
ops.integrator('LoadControl', DGravity)
ops.analysis('Static')
ops.analyze(NstepGravity)
# ------------------------------------------------- maintain constant gravity loads and reset time to zero
ops.loadConst('-time', 0.0)
print('Model Built')
---------
Error
ForceBeamColumn3d::ForceBeamColumn3d -- no torsion detected in sections, continuing with element torsional stiffness GJ/L = 1e+10ForceBeamColumn3d::update() -- could not invert flexibility for element with tag: