Modeling of Deep Beams with OpenSeesPy
You can download the full example here --> DOWNLOAD
Figure below shows the schematic of the OpenSees model. An easy way to understand stress distribution across the beam depth is to plot node reactions on either end of the beam.
Let's start by importing the necessary libraries. I always import math, os, numpy, and matplotlib in all of my Python scripts by default. Other libraries we need are,
vfo - visualization for OpenSees. [see documentation]. Install it to visualize your OpenSeesPy model, deformed shape, etc.
OpenSeesPy - This is our main analysis engine. If you are reading this tutorial, I assume you have this installed.
Now let's define a Python function to create the beam and plot results. We will use 4 variables for this function,
1. beam_length = length of beam
2. beam_depth = depth of beam
3. nEle_L = Number of elements along beam length
4. nEle_D = Number of elements along beam depth
Now define some basic material properties inside this function.
For this example we will use ElasticIsotropic nD material with plane stress condition. OpenSees has block2D and block3D commands for easy and basic meshing.
Fix all the nodes at left end of beam (X-coordinates = 0) and right end of beam (X-coordinates = beam_length) using fixX command in OpenSeesPy.
Apply load at a node near middle of the beam.
Create an output database using the vfo package to visualize the model.
Record X-reaction at all the fixed nodes on the left end of the beam.
We will use matplotlib to plot the recorded node reactions (x-axis) and y-coordinate of corresponding node (y-axis).
Here is the full code...
Here are some results for comparison.