There is no recorder option in OpenSees to get the location of the neutral axis in a fiber section. Instead, you have to post-process the section deformations.
The strain at any point in a 2D fiber section is where
is the section axial deformation,
is the section curvature (about the
-axis), and
is the point location, measured from the section reference axis.
The neutral axis is the location where the strain is zero. Setting gives
.
For example, to find the neutral axis location for section 3 of element 1:
ea,kz = ops.eleResponse(1,'section',3,'deformation')
if kz != 0.0:
y = ea/kz
else:
# Pure axial
pass
For 3D sections, the strain at any point is , so the neutral axis is described by a line,
where
is the curvature about the section
-axis and
is the curvature about the section
-axis.
If the curvature about the -axis is zero, then the neutral axis is at
.

For example, the neutral axis slope and -intercept for section 5 of element 2:
ea,kz,ky,phi = ops.eleResponse(2,'section',5,'deformation')
if kz != 0.0:
b = ea/kz
m = ky/kz
elif ky != 0.0:
z = -ea/ky
else:
# Pure axial
pass
The torsional deformation phi coming from the 3D fiber section is not used.
I showed the section deformations coming from the eleResponse command, but you can do the same calculations using the columns of recorder output. The order and number of section deformations returned by the eleResponse command (and output by a recorder) will vary if you use aggregated sections, so pay attention. If you need to know which deformation is in which column of output, read this post.

I think ops.eleResponse(1,’section’,3,’deformation’) with only moment gives ea, axial strain zero as it gives deformation at neutral axis. So, we should use the axial strain at the top or bottom fibre from stressStrain with eleResponse.
LikeLike