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.

I was no exception when learning OpenSees.

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.node(1,0,0); ops.fix(1,1,1,0)
ops.node(2,L,0); ops.fix(2,1,1,0)




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.,, then run the script at the command line.

$ python

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 mastering OpenSees.

3 thoughts on “How to Bend Beams

Leave a Reply

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

You are commenting using your 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.