How to Bend Beams

How to Boil Water was one of the first cooking shows on the Food Network. Emeril Lagasse was the original host and the show was geared toward people with little to no cooking experience. Everyone starts as a beginner.

PD with OpenSees is no exception.

But when I’m asked where’s the best place to start learning OpenSees, I flounder. After regrouping, I refer to the wiki or YouTube. There’s some good stuff out there, but nothing that’s a confidence builder like boiling water.

So, here’s my attempt at How to Bend Beams.

The simple span shown below has a concentrated moment applied at one end. From statics, we know the support reactions are of equal magnitude but opposite directions. For a linear-elastic, prismatic beam, the closed form end rotations are known.

First, install OpenSeesPy. Then, the commands to define the beam model and analysis are shown below.

import openseespy.opensees as ops

L = 240.0
E = 29000.0
A = 20.0
I = 1400.0
M = 3000.0

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

ops.node(1,0,0); ops.fix(1,1,1,0)
ops.node(2,L,0); ops.fix(2,1,1,0)

ops.geomTransf('Linear',12)
ops.element('elasticBeamColumn',1,1,2,A,E,I,12)

ops.timeSeries('Constant',23)
ops.pattern('Plain',1,23)
ops.load(2,0,0,M)

ops.analysis('Static')

ops.analyze(1)
ops.reactions()

print(f'Node 1 reaction={ops.nodeReaction(1,2)}, expected={M/L}')
print(f'Node 2 reaction={ops.nodeReaction(2,2)}, expected={-M/L}')
print(f'Node 1 rotation={ops.nodeDisp(1,3)}, expected={-M*L/(6*E*I)}')
print(f'Node 2 rotation={ops.nodeDisp(2,3)}, expected={M*L/(3*E*I)}')

Copy and paste these commands to a file, e.g., beam.py, then run the script at the command line.

$ python beam.py

Depending on your Python installations, you may have to use python3 at the command line. You can also use a Jupyter Notebook. Either way, you should see the following output.

After you reproduce these results, try other loadings and beam conditions for which you know the solution, e.g., a point load on the free end of a cantilever or anything from Table 3-23 of the Steel Manual. You’ll be well on your way to OpenSees mastery.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.