OpenSees Cloud
OpenSees AMI
A Nod to Backward Compatibility
Original Post - 31 Jul 2022 - Michael H. Scott
Visit Structural Analysis Is Simple on Substack.
I didn’t want to do it, but I imagined an OpenSees user somewhere out there converting OpenSees Tcl scripts to OpenSeesPy–either manually line by line or using a converter script–and ending up with lines of code that look something like this:
ops.section('Fiber',5)
ops.patch(...)
ops.layer(...)
# tag I J secI lpI secJ lpJ E A I transfTag
ops.element('beamWithHinges',1, 1,2, 5, lp, 5, lp, E,A,I, 3)
After running the script, they will encounter the following error message:
That’s right, we intentionally omitted beamWithHinges
from OpenSeesPy
because the command perpetuates the
misconception that the element interior has to be elastic,
defined by constants E, A, and Iz
(and Iy, G, and J for 3D).
What I want to happen instead is for you to create a beamIntegration
object then pass that to the forceBeamColumn
element. Here, we create an
elastic section for the element interior so that the same response is
obtained as the original beamWithHinges
command.
ops.section('Fiber',5)
ops.patch(...)
ops.layer(...)
ops.section('Elastic',11,E,A,I)
# tag secI lpI secJ lpJ secE
ops.beamIntegration('HingeRadau',7, 5, lp, 5, lp, 11)
# tag I J transfTag beamIntTag
ops.forceBeamColumn('forceBeamColumn',1, 1,2, 3, 7)
Why the extra beamIntegration
command? Because you can then go one step
further and make that section on the element interior whatever section
you want, including (in this example) section tag 5–the same section
prescribed for the plastic hinge regions, a fiber section full of, let’s
imagine, Concrete23 and Steel08.
ops.section('Fiber',5)
ops.patch(...)
ops.layer(...)
# ops.section('Elastic',11,E,A,I)
# ***
ops.beamIntegration('HingeRadau',7,5,lp,5,lp,5)
ops.forceBeamColumn('forceBeamColumn',1,1,2,3,7)
Basically, you’ll get distributed plasticity, but with prescribed
integration weights at the element ends. You can’t do that with the
beamWithHinges
input format, but you can with the beamIntegration
plus
forceBeamColumn
input. And you can also easily mix and match the element
with other
beam integration options.
After all, “beam with hinges” is
nothing more than a manipulation of the numerical integration in the
force-based element formulation.
Still, I didn’t want to do it. But my track record with backward
compatibility is not the best. So, I made
pull request #932
for you to
use ops.beamWithHinges(...)
in OpenSeesPy. The PR was made after the
release of OpenSeesPy 3.4.0.2, so the command will be available with
version 3.4.0.3 and later.
As far as I recall, no one has reported (at least not to me) a problem
with not being able to use beamWithHinges
in OpenSeesPy. I would like to
attribute the non-reporting to the more flexible alternative with
beamIntegration
and forceBeamColumn
being widely known and accepted, and
not me imagining a problem that doesn’t exist. So, if you have
encountered this problem, let me know in the comments section below.