Search found 13 matches

by oscom
Mon Dec 04, 2023 10:07 am
Forum: Useful Scripts.
Topic: Defining HystereticSM material
Replies: 4
Views: 13587

Re: Defining HystereticSM material

Turns out that had some issue with Anaconda that wasn't allowing OpenSees to update correctly. Had to uninstall and install Anaconda. Now it's working fine. Thank you professor.
by oscom
Thu Nov 30, 2023 10:39 pm
Forum: Useful Scripts.
Topic: Defining HystereticSM material
Replies: 4
Views: 13587

Re: Defining HystereticSM material

I've copied the examples shown in the documentation, but for some examples I'm getting the same error message, and for other examples I'm getting the following error: :(

Invalid data for uniaxial HystereticSM 99
Traceback (most recent call last):

Thank you.
by oscom
Wed Nov 29, 2023 5:16 pm
Forum: Useful Scripts.
Topic: Defining HystereticSM material
Replies: 4
Views: 13587

Defining HystereticSM material

Hi everyone, I've been trying to model some plastic hinges using the new HystereticSM material in OpenSeesPy but I'm making some mistake doing so. I believe there is no documentation yet in the openseespy about the material. The code I'm using is the following:
-----------------------------------------------
import openseespy.opensees as op

op.wipe()

op.model('basic','-ndm',2)

matTag = 1
#eP #sP
p1=[35.3233,0.00551]
p2=[49.4526,0.03]
p3=[49.4527,0.07]
p4=[4.9453,0.09]

#eN #sN
n4=[-4.9453,-0.09]
n3=[-49.4527,-0.07]
n2=[-49.4526,-0.03]
n1=[-35.3233,-0.00551]

#Pinching
pinchX = 0.0 #0.0
pinchY = 0.35 #0.35

#Damage
damage1 = 0.0 #Ductilidad 0.03
damage2 = 0.0 #Energía 0.0

beta = 0.0

#Now, I've tried 2 ways for the material definition

op.uniaxialMaterial('HystereticSM', matTag, '-posEnv', *p1, *p2, *p3, *p4, '-negEnv', *n1, *n2, *n3, *n4, '-pinch', pinchX, pinchY, '-damage', damage1, damage2, '-beta', beta)

#OR:

#op.uniaxialMaterial('HystereticSM', matTag, *p1, *p2, *p3, *p4, *n1, *n2, *n3, *n4, pinchX, pinchY, damage1, damage2, beta)
-----------------------------------------------
The error message I'm getting is always:

numargs0 HystereticSM 22
numOptionalArgs HystereticSM 0
numArgs HystereticSM 22
Want: uniaxialMaterial HystereticSM tag? mom1p? rot1p? mom2p? rot2p? <mom3p? rot3p? mom4p? rot4p? mom5p? rot5p? mom6p? rot6p? mom7p? rot7p?>
mom1n? rot1n? mom2n? rot2n? <mom3n? rot3n? mom4n? rot4n? mom5n? rot5n? mom6n? rot6n? mom7n? rot7n?> pinchX? pinchY? damfc1? damfc2? <beta?>
<-degEnvFactor degEnvFactor?>
<-defoLimitStates lsD1? <lsD2?>...>
<-forceLimitStates lsF1? <lsF2?>...> Traceback (most recent call last):


File "<string>", line 28, in <module>

OpenSeesError: See stderr output

Thank you.
by oscom
Thu May 18, 2023 7:14 am
Forum: OpenSeesPy
Topic: Windows fatal exception: access violation
Replies: 7
Views: 10262

Re: Windows fatal exception: access violation

mhscott wrote: Thu May 18, 2023 6:38 am Track down the line of code that causes the error
The line of code that produces that error corresponds to the Analyze command, that is to say:

op.analyze(1)
by oscom
Wed May 17, 2023 5:08 pm
Forum: OpenSeesPy
Topic: Windows fatal exception: access violation
Replies: 7
Views: 10262

Windows fatal exception: access violation

Hi everyone, I've been doing some static pushover analysis and I'm getting this error:

Windows fatal exception: access violation


Main thread:
Current thread 0x00003a08 (most recent call first):
File "D:\Oscar\Maestr\xeda Estructuras Sismorresistentes\Tesis STMF\OpenSees\Pushover\RunPushover.py", line 147 in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 465 in exec_code
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 585 in runfile
File "C:\Users\Oscar\AppData\Local\Temp\ipykernel_3388\149753308.py", line 1 in <module>


Restarting kernel...

If anyone is familiar with it please let me know. I beliebe it has something to do with Python.

Thank you.
by oscom
Tue May 09, 2023 11:19 am
Forum: OpenSeesPy
Topic: converting opensees codes to openseespy
Replies: 3
Views: 8606

Re: converting opensees codes to openseespy

You can try ChatGPT also. You give some specific format you want, and then the tcl lines you want to convert. I'ts been working well till now, as long as you are specific.
by oscom
Sun Apr 23, 2023 2:43 pm
Forum: OpenSeesPy
Topic: Issue with PDelta efects in 2D Special Truss Moment Frame
Replies: 0
Views: 8712

Issue with PDelta efects in 2D Special Truss Moment Frame

Hi everyone,

I've been carrying out some pushover analysis in a 2D Special Truss Moment Frame. To take into account the PDelta effects, vertical loads are applied in the nodes of the upper chord, but when I apply the PDelta geometric transformation, the capacity curve (Lateral displacement Vs Base shear), exhibits a bit more capacity that the one with Linear geometric transformation instead of less capacity. I don't know if there is something about PDelta effects that I'm missing, or maybe the way that gravity load have to be applied. For reference I'm including the code untill the part where the vertical load is aplyied below. Pleasle let me know if you need anything else

Thank you all.

########################################
# RunPushover.py
########################################

import openseespy.opensees as op

import os

from math import sqrt, pi

op.wipe()

op.model('basic','-ndm',2)

# Add PDelta ?
PDelta="Yes" #Yes or No

# Define final drift in node control
DerUlt=0.02
############### Define Sections and Materials #####################

E=210000000
mat7=7 #Steel elastic material
op.uniaxialMaterial('Elastic', mat7, E)

mat8=8 # Column hinge W36x652

p1 = [20247.63, 0.0059]
p2 = [22272.39, 0.06]
p3 = [22272.4, 0.061]

n1 = [-20247.63, -0.0059]
n2 = [-22272.39, -0.06]
n3 = [-22272.4, -0.061]

#Pinching
pinchX = 0.0 #0.0
pinchY = 0.52 #0.52

#Damage per cycle
damage1 = 0.0 #Ductilidad 0.03
damage2 = 0.0 #Energía 0.0

#Stiffness damage
beta = 0.0

op.uniaxialMaterial('Hysteretic', mat8, *p1, *p2, *p3, *n1, *n2, *n3, pinchX, pinchY, damage1, damage2, beta)

mat9=9 # Double Channel chord hinge 2C15x50

p1 = [950.37, 0.012]
p2 = [1330.52, 0.03]
p3 = [1330.53, 0.07]

n1 = [-950.37, -0.012]
n2 = [-1330.52, -0.03]
n3 = [-1330.53, -0.07]

#Pinching
pinchX = 0.0 #0.0
pinchY = 0.52 #0.52

#Damage per cycle
damage1 = 0.0 #Ductilidad 0.03
damage2 = 0.0 #Energía 0.0

#Stiffness damage
beta = 0.0

op.uniaxialMaterial('Hysteretic', mat9, *p1, *p2, *p3, *n1, *n2, *n3, pinchX, pinchY, damage1, damage2, beta)
#-----------------------------------------------------------------------------------------------------------
#Node Masses
m1=13.5 #Masa de 132.39 kN
m2=6.75

# Columns
A_W36x652=1238.7/(100**2)
I_W36x652=2106131/(100**4)

#Chords
A_2C15x50=188.9672/(100**2)
I_2C15x50=33510.9/(100**4)

#Vertical truss members
A_2C6x13=49.0837/(100**2)
I_2C6x13=1442.975/(100**4)

#Diagonals
A_2MC12x35=131.703/(100**2)
I_2MC12x35=17885.826/(100**4)

############### Define Geometry #####################

#General Data
L=3.048
H_2=3*L
H_1=2*L
d_col=0.0
d_vig=0.0

#Nodess

op.node(1,0,0)
op.node(2,9*L,0)

#Lower Chord
for x in range(3,12+1):
op.node(x,(x-3)*L,H_1)

#Upper chord
for x in range(13,22+1):
op.node(x,(x-13)*L,H_2)

#Chord hinges nodes
op.node(100,4*L,H_1)
op.node(101,5*L,H_1)

op.node(102,4*L,H_2)
op.node(103,5*L,H_2)

#Column hinges nodes
op.node(200,0,0)
op.node(201,9*L,0)

#Supports
# fix(nodeTag, *constrValues)
op.fix(1,1,1,1)
op.fix(2,1,1,1)

#Masses
#mass(nodeTag, *massValues)
op.mass(13,m2,0,0)
op.mass(14,m1,0,0)
op.mass(15,m1,0,0)
op.mass(16,m1,0,0)
op.mass(17,m1,0,0)
op.mass(18,m1,0,0)
op.mass(19,m1,0,0)
op.mass(20,m1,0,0)
op.mass(21,m1,0,0)
op.mass(22,m2,0,0)

####CONSTRAINTS
#Floor horizontal constraints
op.equalDOF(13,14,1) #
op.equalDOF(13,15,1)
op.equalDOF(13,16,1)
op.equalDOF(13,19,1)
op.equalDOF(13,20,1)
op.equalDOF(13,21,1)
op.equalDOF(13,22,1)

#Hinges constraints
op.equalDOF(7,100,1,2)
op.equalDOF(8,101,1,2)

op.equalDOF(17,102,1,2)
op.equalDOF(18,103,1,2)

op.equalDOF(1,200,1,2)
op.equalDOF(2,201,1,2)

#Geometric transformation
# geomTransf('Linear', transfTag, '-jntOffset', *dI, *dJ)

transfTag=1
if PDelta == 'Yes':
op.geomTransf('PDelta',transfTag)
print("Efectos P-Delta incuidos")
elif PDelta == 'No':
op.geomTransf('Linear',transfTag)
print("Analisis sin efecots P-Delta")

#ELEMENTS
# element('elasticBeamColumn', eleTag, *eleNodes, Area, E_mod, Iz, transfTag, <'-mass', mass>, <'-cMass'>, <'-release', releaseCode>)

#Columns
op.element('elasticBeamColumn',1,200,3,A_W36x652,E,I_W36x652,transfTag)
op.element('elasticBeamColumn',2,201,12,A_W36x652,E,I_W36x652,transfTag)
op.element('elasticBeamColumn',3,3,13,A_W36x652,E,I_W36x652,transfTag)
op.element('elasticBeamColumn',4,12,22,A_W36x652,E,I_W36x652,transfTag)

#Chords
op.element('elasticBeamColumn',5,3,4,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',6,4,5,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',7,5,6,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',8,6,7,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',9,100,101,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',10,8,9,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',11,9,10,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',12,10,11,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',13,11,12,A_2C15x50,E,I_2C15x50,transfTag)

op.element('elasticBeamColumn',14,13,14,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',15,14,15,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',16,15,16,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',17,16,17,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',18,102,103,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',19,18,19,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',20,19,20,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',21,20,21,A_2C15x50,E,I_2C15x50,transfTag)
op.element('elasticBeamColumn',22,21,22,A_2C15x50,E,I_2C15x50,transfTag)

#Diagonals
op.element('Truss',23,3,14,A_2MC12x35,mat7)
op.element('Truss',24,14,5,A_2MC12x35,mat7)
op.element('Truss',25,5,16,A_2MC12x35,mat7)
op.element('Truss',26,16,7,A_2MC12x35,mat7)

op.element('Truss',27,8,19,A_2MC12x35,mat7)
op.element('Truss',28,19,10,A_2MC12x35,mat7)
op.element('Truss',29,10,21,A_2MC12x35,mat7)
op.element('Truss',30,21,12,A_2MC12x35,mat7)

#Vertical truss members
op.element('Truss',31,4,14,A_2C6x13,mat7)
op.element('Truss',32,5,15,A_2C6x13,mat7)
op.element('Truss',33,6,16,A_2C6x13,mat7)
op.element('Truss',34,7,17,A_2C15x50,mat7)
op.element('Truss',35,8,18,A_2C15x50,mat7)
op.element('Truss',36,9,19,A_2C6x13,mat7)
op.element('Truss',37,10,20,A_2C6x13,mat7)
op.element('Truss',38,11,21,A_2C6x13,mat7)

# Plastic Hinges
# element('zeroLength', eleTag, *eleNodes, '-mat', *matTags, '-dir', *dirs, <'-doRayleigh', rFlag=0>, <'-orient', *vecx, *vecyp>)
#Chords
op.element('zeroLength',100,7,100,'-mat',mat9,'-dir',6)
op.element('zeroLength',101,101,8,'-mat',mat9,'-dir',6)

op.element('zeroLength',102,17,102,'-mat',mat9,'-dir',6)
op.element('zeroLength',103,103,18,'-mat',mat9,'-dir',6)

#Columns
op.element('zeroLength',200,1,200,'-mat',mat8,'-dir',6)
op.element('zeroLength',201,2,201,'-mat',mat8,'-dir',6)

if PDelta == "Yes":

#Vertical nodal load
q1=-132.39 #kN
q2=-66.2 #kN

#timeSeries(tsType, tsTag, *tsArgs)
tsTag=1
op.timeSeries('Linear',tsTag)

# Load Pattern

patternTag1=1
op.pattern('Plain',patternTag1,tsTag)

# Aplying loads
op.load(13,0,q2,0) # Ingresar mitad de la carga de una planta del edificio si hay porticos intermedios
op.load(14,0,q1,0)
op.load(15,0,q1,0)
op.load(16,0,q1,0)
op.load(17,0,q1,0)
op.load(18,0,q1,0)
op.load(19,0,q1,0)
op.load(20,0,q1,0)
op.load(21,0,q1,0)
op.load(22,0,q2,0)
by oscom
Fri Mar 24, 2023 7:48 pm
Forum: Documentation
Topic: Hinge Radau integration method
Replies: 3
Views: 12593

Re: Hinge Radau integration method

Thank you very much Professor, and about the integration points, in OpenSeesPy documentation, it says 4 integration points are used (at the element ends and 8/3Lp inside), but I'm obtaining 6 Section moment-curvature relationships by using an element recorder, could you please confirm this and what the integration points locations and weights are?

Thank you.
by oscom
Thu Mar 23, 2023 8:52 pm
Forum: Documentation
Topic: Hinge Radau integration method
Replies: 3
Views: 12593

Hinge Radau integration method

Hi everyone, I've been reading Professor's Scott research on this topic from 2006 research where this method had 4 integration points, to a modification of this method with 6 integration points later in 2015 and I have some questions

1) The 'HingeRadau' method is currently aplying the 4 or 6 integration points ?
2) I'm a bit new in the general finite element theory and I've not been able to find the explanation why 2 extra integration points were added in the inner (elastic) region of the beam and its locations. I'd be very thankfull if anyone can help me a bit with this.

Thank you.
by oscom
Thu Jan 12, 2023 5:14 pm
Forum: OpenSeesPy
Topic: Defining MinMax material
Replies: 2
Views: 2203

Re: Defining MinMax material

Thank you! I didnt see it at all
by oscom
Wed Jan 11, 2023 9:02 am
Forum: OpenSeesPy
Topic: Defining MinMax material
Replies: 2
Views: 2203

Defining MinMax material

Hi everyone,

I'm having issue defining MinMax material with the following code

------------------------------------------------------------
import openseespy.opensees as op
import os
from math import sqrt, pi
op.wipe()
op.model('basic','-ndm',2)

matTag=1
otherTag=2
Fy=3.780 #[T/cm2]
E0=2100.
b=0.00577

op.uniaxialMaterial('Steel01',otherTag,Fy,E0,b)
op.uniaxialMaterial('MinMax', matTag, otherTag, '-min', -0.1, 'max', 0.1)

It returns this error

WARNING invalid option:max uniaxialMaterial MinMax tag: 1
-----------------------------------------------------------
Thank you.
by oscom
Wed Jan 04, 2023 3:18 pm
Forum: Useful Scripts.
Topic: Defining Hysteretic material
Replies: 4
Views: 9663

Re: Defining Hysteretic material

It worked, thank you for your support!
by oscom
Thu Dec 29, 2022 1:07 am
Forum: Useful Scripts.
Topic: Defining Hysteretic material
Replies: 4
Views: 9663

Defining Hysteretic material

Hi everyone, Im getting started at OpenSees and I'm not familiar with this error while defining Hysteretic material, don't know if its a pythong bug or I'm missing something:

TypeError: uniaxialMaterial() takes no keyword arguments

The python code to define the material only is:

import openseespy.opensees as op

op.wipe()

op.model('basic','-ndm',2)

matTag= 1
p1=[312.26, 0.01]
p2=[437.16, 0.03]
p3=[437.1, 0.07]

n1=[-312.26, -0.01]
n2=[-437.16, -0.03]
n3=[-437.1, -0.07]

#Pinching
pinchX=0.2
pinchY=0.8

#Damage
damage1=0.0
damage2=0.2

op.uniaxialMaterial('Hysteretic', matTag, *p1, *p2, *p3, *n1, *n2, *n3, pinchX, pinchY, damage1, damage2, beta=0.0)

Thank you.