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,
eleResponse command in 3D analysis
Moderators: silvia, selimgunay, Moderators
Re: eleResponse command in 3D analysis
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.
Re: eleResponse command in 3D analysis
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.
P.S.You won't need the hyphens for the 2D model either.
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]
Re: eleResponse command in 3D analysis
Thanks a lot! It works well now.
-
- Posts: 4
- Joined: Sat Sep 16, 2017 4:23 pm
- Location: university of auckland
Re: eleResponse command in 3D analysis
A detailed explanation and additional discussion about it can be seen here:
viewtopic.php?f=12&t=66954&sid=1aa47881 ... 476efafe65
viewtopic.php?f=12&t=66954&sid=1aa47881 ... 476efafe65