hello, everyone! I encountered an error when using the 'remove element' command for pushdown analysis in OpenSeesPy.
Before gravity analysis, remove the column component with [ops.remove('ele', 113)' and 'ops.remove('node', 13)] command to conduct gravity analysis and pushdown analysis. The program runs accurately. However, after the gravity analysis is completed, remove the column component with 'remove element' command for pushdown analysis, and the OpenSeesPy program will crash and exit.
Does anyone know what happened?
Thank you very much.
question about 'remove element' command in OpenSeesPy
Moderators: silvia, selimgunay, Moderators
Re: question about 'remove element' command in OpenSeesPy
Do you have an element recorder defined for element 113?
Re: question about 'remove element' command in OpenSeesPy
Hello, Professor Scott. Thanks for your reply!
Nope, I only used the recorder command to record the displacement of the loading point.
And I found something. After the gravity analysis is completed, if pushdown analysis has to run normally, element 113 and node 13 need to be deleted, and the weight of element 13 defined by the 'eleload' command must also be deleted.
The above is validated without applying the weight load of eleload 113 in the gravity analysis. At present, I don't know how to consider how to remove the element weight load with 'remove' command to conduct pushdown analysis after completing the gravity analysis of the complete structure.
Re: question about 'remove element' command in OpenSeesPy
Please provide a minimal working example that demonstrates the issue: https://portwooddigital.com/2021/07/01/ ... g-example/
Re: question about 'remove element' command in OpenSeesPy
Hello Professor, I have chosen a cantilever column example 1a on the official website to illustrate the situation. I changed the column from one element to two elements, and the two nodes into three nodes. For gravity analysis, eleload is used to apply weight. Both element 1 and 2 have an weight load (assuming a value), and pushover load is applied to the top of the first element (node 2). Then the upper element is deleted for analysis.mhscott wrote: ↑Mon Jun 20, 2022 5:17 am Please provide a minimal working example that demonstrates the issue: https://portwooddigital.com/2021/07/01/ ... g-example/
The current situation is that after the gravity analysis is completed, element 2 and node 3 are deleted. Then, when pushover analysis is performed, the program will exit.
If the corresponding eleload command of element 2 is not applied in the gravity analysis module, the program can be run normally (that is, delete the command on line 80 to run the program, "ops.eleLoad('-ele', 2, '-type', '-beamUniform', 0, -20)").
However, I plan to conduct the gravity analysis of the intact structure including all elements, and then delete the components to conduct the pushover or pushdown analysis. How should I operate in openseespy to remove the eleload of failed components to ensure that the program can run. (there is no 'remove eleload' command in openseespy)
- ############################################################
# EXAMPLE:
# pyEx1a.Canti2D.Push.tcl.py
# for OpenSeesPy
# --------------------------------------------------------#
# by: Silvia Mazzoni, 2020
# silviamazzoni@yahoo.com
############################################################
# This file was obtained from a conversion of the updated Tcl script
############################################################
# configure Python workspace
import openseespy.opensees as ops
import eSEESminiPy
import os
import math
import numpy as numpy
import matplotlib.pyplot as plt
ops.wipe()
# --------------------------------------------------------------------------------------------------
# Example 1. cantilever 2D
# static pushover analysis with gravity.
# all units are in kip, inch, second
# elasticBeamColumn ELEMENT
# Silvia Mazzoni and Frank McKenna, 2006
#
# ^Y
# or
# 2 __
# or |
# or |
# or |
# (1) 36'
# or |
# or |
# or |
# =1= ---- -------->X
#
# SET UP ----------------------------------------------------------------------------
ops.wipe() # clear opensees model
ops.model('basic','-ndm',2,'-ndf',3) # 2 dimensions, 3 dof per node
if not os.path.exists('Data'):
os.mkdir('Data')
# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
ops.node(1,0,0) # node , X Y
ops.node(2,0,432/2)
ops.node(3,0,432)
# Single point constraints -- Boundary Conditions
ops.fix(1,1,1,1) # node DX DY RZ
# nodal masses:
ops.mass(2,5.18/2,0.,0.) # node , Mx My Mz, Mass=Weight/g.
ops.mass(3,5.18/2,0.,0.) # node , Mx My Mz, Mass=Weight/g.
# Define ELEMENTS -------------------------------------------------------------
# define geometric transformation: performs a linear geometric transformation of beam stiffness
# and resisting force from the basic system to the global-coordinate system
ops.geomTransf('Linear',1) # associate a tag to transformation
# connectivity: (make A very large, 10e6 times its actual value)
# element elasticBeamColumn eleTag iNode jNode A E Iz transfTag
ops.element('elasticBeamColumn',1,1,2,3600000000,4227,1080000,1) # element elasticBeamColumn 1 1 2 3600000000 4227 1080000 1;
ops.element('elasticBeamColumn',2,2,3,3600000000,4227,1080000,1) # element elasticBeamColumn 1 1 2 3600000000 4227 1080000 1;
# Define RECORDERS -------------------------------------------------------------
ops.recorder('Node','-file','Data/DFreeEx1aPush.out','-time','-node',2,'-dof',1,2,3,'disp') # displacements of free nodes
ops.recorder('Node','-file','Data/RBaseEx1aPush.out','-time','-node',1,'-dof',1,2,3,'reaction') # support reaction
ops.recorder('Element','-file','Data/FColEx1aPush.out','-time','-ele',1,'globalForce') # element forces -- column
ops.recorder('Element','-file','Data/DColEx1aPush.out','-time','-ele',1,'deformation') # element deformations -- column
# define GRAVITY -------------------------------------------------------------
ops.timeSeries('Linear',1) # timeSeries Linear 1;
# define Load Pattern
ops.pattern('Plain',1,1) #
ops.load(2,0.,-2000.,0.) # node , FX FY MZ -- superstructure-weight
ops.eleLoad('-ele', 1, '-type', '-beamUniform', 0, -20)
ops.eleLoad('-ele', 2, '-type', '-beamUniform', 0, -20)
ops.wipeAnalysis() # adding this to clear Analysis module
ops.constraints('Plain') # how it handles boundary conditions
ops.numberer('Plain') # renumber dofs to minimize band-width (optimization), if you want to
ops.system('BandGeneral') # how to store and solve the system of equations in the analysis
ops.test('NormDispIncr',1.0e-8,6) # determine if convergence has been achieved at the end of an iteration step
ops.algorithm('Newton') # use Newtons solution algorithm: updates tangent stiffness at every iteration
ops.integrator('LoadControl',0.1) # determine the next time step for an analysis, apply gravity in 10 steps
ops.analysis('Static') # define type of analysis static or transient
ops.analyze(10) # perform gravity analysis
ops.loadConst('-time',0.0) # hold gravity constant and restart time
# define LATERAL load -------------------------------------------------------------
# Lateral load pattern
ops.timeSeries('Linear',2) # timeSeries Linear 2;
# define Load Pattern
ops.pattern('Plain',2,2) #
ops.load(2,2000.,0.0,0.0) # node , FX FY MZ -- representative lateral load at top node
ops.remove('ele', 2)
ops.remove('node', 3)
# pushover: diplacement controlled static analysis
ops.integrator('DisplacementControl',2,1,0.1) # switch to displacement control, for node 11, dof 1, 0.1 increment
ops.analyze(1000) # apply 100 steps of pushover analysis to a displacement of 10
print('Done!')
eSEESminiPy.drawModel()
eSEESminiPy.drawDeformedShape(5)
ops.wipe() # the wipe command here closes all recorder files
plt.close('all')
fname3 = 'Data/DFreeEx1aPush.out'
dataDFree = numpy.loadtxt(fname3)
plt.subplot(211)
plt.title('Ex1a.Canti2D.Push.tcl')
plt.grid(True)
plt.plot(dataDFree[:,1])
plt.xlabel('Step Number')
plt.ylabel('Free-Node Displacement')
plt.subplot(212)
plt.grid(True)
plt.plot(dataDFree[:,1],dataDFree[:,0])
plt.xlabel('Free-Node Disp.')
plt.ylabel('Pseudo-Time (~Force)')
plt.show()
print('End of Run: pyEx1a.Canti2D.Push.tcl.py')