"Possible" Bug with the FiberSection3D?!!

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
motalaat
Posts: 17
Joined: Wed Jul 21, 2004 11:10 am
Location: UC Berkeley
Contact:

"Possible" Bug with the FiberSection3D?!!

Post by motalaat » Thu May 19, 2005 1:20 pm

Hey, I am set to work on a modified - confined concrete - fiber section starting from the existing one. In exploring the existing code I ran into the following method:

Code: Select all

FiberSection3d::addFiber {
and near the end it recomputes the centroid by

Code: Select all

// Recompute centroid
  for (i = 0; i < numFibers; i++) {
    yLoc = -matData[2*i];
    zLoc = matData[2*i+1];
    Area = matData[2*i+2];
// code truncated
I believe the "2" in the lines above should be "3" or else the "Area" fields will be overwritten by the subsequent "yLoc", and only 2/3 of the matData fields will be updated . It appears like a copy-and-paste operation from

Code: Select all

FiberSection2d::addFiber
which was overlooked in the editing.

I cannot believe it caused no problems before with all the users using 3-D models. However. it is possible to imagine given that

Code: Select all

addFiber
will typically add a number of steel bars that are not heavily influential in offsetting the centroid. This is more so since the method does not consider the "virtual section - modular ratio <n>" and because the reinforcing steel is usually more or less uniform or balanced in a column or beam section, respectively.

P.S. I am using the source code for OpenSees 1.6.0 since I am too lazy to port the stuff I already coded into the newer version. If this bug has been caught and corrected in the current version, my apologies :wink:

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk » Fri May 20, 2005 9:02 am

yes it was a bug.. will put a new release 1.6.2.a on-line hopefully tomorrow.

Post Reply