Openseespy can't calculate all seismic load steps completely

Forum for asking and answering questions related to use of the OpenSeesPy module

Moderators: silvia, selimgunay, Moderators

Post Reply
XiaoHui
Posts: 3
Joined: Wed Feb 24, 2021 7:13 am

Openseespy can't calculate all seismic load steps completely

Post by XiaoHui »

Hi, everyone, when I used openseespy for seismic time history analysis, I set 5000 steps, but the calculation stopped suddenly when it reached 4800. But with the same code, OpenSees TCL can complete 5000 steps. Has anyone ever encountered such a problem?
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Openseespy can't calculate all seismic load steps completely

Post by mhscott »

Please provide more details. Are you sure the models are exactly the same?
XiaoHui
Posts: 3
Joined: Wed Feb 24, 2021 7:13 am

Re: Openseespy can't calculate all seismic load steps completely

Post by XiaoHui »

For example, this simple single pier analysis model encountered such a problem when it was running. I don't know where my code went wrong。

Code: Select all

#################################################
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 25 23:08:01 2021
@author: quanjingwu
"""
from openseespy.opensees import *
import os
import numpy as np
import matplotlib.pyplot as plt
wipe()					                
model ('Basic','-ndm',3,'-ndf',6) 
# # defind pier
high = 20.00
node (11,0.000E+000,0.000E+000,0)
node (12,0.000E+000,0.000E+000,high/3)
node (13,0.000E+000,0.000E+000,high/3*2)
node (14,0.000E+000,0.000E+000,high)
node (15,0.000E+000,0.000E+000,high)
As2 = 6.237   
As3 = 23.403
As4 = 12.66475628
pier_steps = 4
pier1 = As3*high/pier_steps*2.500
pier2 = As3*high/(pier_steps-1)*2.500
pier_uniform = As3*2.500
mass(12,pier2,0,0,0,pier2,0)
mass(13,pier2,0,0,0,pier2,0)  
mass(14,pier2,0,0,0,pier2,0)  
mass(15,1350,0,0,0,1350,0) 

fix(11,1,1,1,1,1,1)
fix(12,0,1,1,1,0,1)
fix(13,0,1,1,1,0,1)
fix(14,0,1,1,1,0,1)
fix(15,0,1,1,1,0,1)

uniaxialMaterial('Steel02',4,700,20000,0.03,8,0.00,0.15)
I4 = 19.141  
I5 = 99.845  
J6 = 61.802  
geomTransf ('PDelta',1,1.000,0.000,0.000)             
element ('elasticBeamColumn',1,11,12,As3,3.150E+007,1.3125E+007,J6,I4,I5,1)
element ('elasticBeamColumn',2,12,13,As3,3.150E+007,1.3125E+007,J6,I4,I5,1)
element ('elasticBeamColumn',3,13,14,As3,3.150E+007,1.3125E+007,J6,I4,I5,1)
element ('zeroLength',5,14,15,'-mat',4,4,'-dir',1,2)   
timeSeries ("Linear",1)
mkpath = 'single_pier_analysis_recorder'
if not os.path.exists(mkpath):
    os.mkdir(mkpath)      		
for i in range(11,16):
    filename = 'node'+str(i)+'.out'
    recorder ('Node','-file',"single_pier_analysis_recorder"+'/'+filename,'-node',i,'-dof',1,2,'disp')

# ############ defined Rayleigh damping
import math
# xDamp = 0.05                                                                                      
# nEigenI = 1                                                                                                         
# nEigenJ = 2                                                                                                          
# lambdaN = eigen(nEigenJ)
# #print(lambdaN)                                                              
# lambdaI = lambdaN[nEigenI-1]                              
# lambdaJ = lambdaN[nEigenJ-1]                                  
# omegaI = math.pow(lambdaI,0.5)                                                         
# omegaJ = math.pow(lambdaJ,0.5)                                                        
# alphaM = xDamp*(2*omegaI*omegaJ)/(omegaI+omegaJ)    
# betaKcurr = 2.*xDamp/(omegaI+omegaJ)
# rayleigh(alphaM,betaKcurr,0,0) 

IDloadTag = 1001                   
iGMfile = '0.30g_2_2.txt'         ;# choose a earthquake wave        
iGMdirection = 1                   
iGMfact = 0.01                
dt = 0.02                      
timeSeries('Path', 2, '-filePath', iGMfile, '-dt', dt, '-factor', iGMfact)
pattern('UniformExcitation', IDloadTag, iGMdirection,'-accel',2) 

constraints ('Transformation')                
numberer ('RCM')                                 
system ('UmfPack') 
test ('EnergyIncr',1.0e-1,200)
algorithm ('KrylovNewton')  
integrator ('Newmark',0.5,0.25) 
analysis ('Transient')
analyze (5000,0.02)
Post Reply