eleResponse command in 3D analysis

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

Moderators: silvia, selimgunay, Moderators

Post Reply
JAMINPARK
Posts: 11
Joined: Tue Sep 23, 2014 11:58 pm

eleResponse command in 3D analysis

Post by JAMINPARK » Wed Oct 28, 2020 6:40 pm

Hi everyone,

I am trying to check whether stress and strain in a section can be obtained using 'eleResponse' command during analysis.
To this end, I made a very simple 3D example for a static analysis of a cantilever beam with unit length as follows:
--------------------------------------------------------------------------------------------------------------------------
import openseespy.opensees as ops

ops.wipe()
ops.model('Basic','-ndm',3,'-ndf',6)

ops.node(101,0,0,0)
ops.node(201,1,0,0)

ops.uniaxialMaterial('Elastic',1,2*10**5)

ops.section('Fiber',333,'-torsion',1)
ops.patch('rect',1,10,10, -1.0,-1.0,1.0,1.0)

ops.geomTransf('Linear', 111,0,-1,0)
ops.element('nonlinearBeamColumn',1, 101, 201, 5, 333, 111)

ops.fix(101,1,1,1,1,1,1)

ops.timeSeries('Linear',1)
ops.pattern('Plain',1,1)
weight_node = [0,0,-100,0,0,0]
ops.load(201,*weight_node)

ops.constraints('Plain')
ops.numberer('Plain')
ops.system('BandGeneral')
ops.test('NormDispIncr',1.0e-6,5000)
ops.algorithm('Newton')
ops.integrator('LoadControl',1.0)
ops.analysis('Static')
ops.analyze(1)

section_ss = ops.eleResponse(1, '-section', '1', '-fiber', '-1.0', '0.0', '1', 'stressStrain')
--------------------------------------------------------------------------------------------------------------------------

As you can see in the last line, I used 'eleResponse' command to obtain stress and strain. But it seems not working properly. 'section_ss' becomes [].
However, when I convert the above example to 2D as below, the 'eleResponse' command works well.

--------------------------------------------------------------------------------------------------------------------------
import openseespy.opensees as ops

ops.wipe()
ops.model('Basic','-ndm',2,'-ndf',3)

ops.node(101,0,0)
ops.node(201,1,0)

ops.uniaxialMaterial('Elastic',1,2*10**5)

ops.section('Fiber',333,'-torsion',1)
ops.patch('rect',1,10,10,-1.0,-1.0,1.0,1.0)

ops.geomTransf('Linear', 111)
ops.element('nonlinearBeamColumn',1, 101, 201, 5, 333, 111)

ops.fix(101,1,1,1)

ops.timeSeries('Linear',1)
ops.pattern('Plain',1,1)
weight_node = [0,-100,0]
ops.load(201,*weight_node)

ops.constraints('Plain')
ops.numberer('Plain')
ops.system('BandGeneral')
ops.test('NormDispIncr',1.0e-6,5000)
ops.algorithm('Newton')
ops.integrator('LoadControl',1.0)
ops.analysis('Static')
ops.analyze(1)

section_ss = ops.eleResponse(1, '-section', '1', '-fiber', '-1.0', '0.0', '1', 'stressStrain')
--------------------------------------------------------------------------------------------------------------------------
Could you confirm whether the eleResponse command works properly in 3D analysis ?

Thanks in advance for your kind reply.

Jamin,

KevinNTU
Posts: 4
Joined: Wed Oct 28, 2020 2:19 pm

Re: eleResponse command in 3D analysis

Post by KevinNTU » Wed Oct 28, 2020 11:08 pm

Hi, just want to ask some questions thats irrelevant... I am all new to this site, but it seems like there are a bunch of people who are interrupting this community(ie, posting bullshit forums and leaving comments that obviously has nothing to do with the question). Is that a new thing or this happens all the time on this site? I think Frank probably wants to notice this issue.

melekeen
Posts: 1
Joined: Wed Jun 13, 2018 2:22 am
Location: AAiT

Re: eleResponse command in 3D analysis

Post by melekeen » Thu Oct 29, 2020 2:16 am

Hey there,

The command should be as follows: eleResponse(elemTag, 'section', 'fiber', locY, locZ, response). Just remove the hyphen (-) in argument identifier strings and it works just fine. See the code below.

Code: Select all

section_ss = ops.eleResponse(1, 'section', '1', 'fiber', '-1.0', '0.0', 'stressStrain')
print(section_ss)
>> [-68.18181818181819, -0.00034090909090909094]
P.S.You won't need the hyphens for the 2D model either.

JAMINPARK
Posts: 11
Joined: Tue Sep 23, 2014 11:58 pm

Re: eleResponse command in 3D analysis

Post by JAMINPARK » Thu Oct 29, 2020 5:08 am

Thanks a lot! It works well now.

pavanchigullapally
Posts: 4
Joined: Sat Sep 16, 2017 4:23 pm
Location: university of auckland

Re: eleResponse command in 3D analysis

Post by pavanchigullapally » Tue Nov 03, 2020 6:00 pm

A detailed explanation and additional discussion about it can be seen here:
viewtopic.php?f=12&t=66954&sid=1aa47881 ... 476efafe65

Post Reply