# I have some problems doing simple stress analysis on a beam being bend

In a assignment I have this beam that is under a bending load. Failure can occur due to shear or normal stresses. My task is to determine the location where the maximum stress occurs as a function of x. Where x is the distance from the tip of the beam, but in a negative direction. This is because the drawing giving to me in the assignment has the origin at the tip and the beam is on the left side of the graph.

To make it easier I created a script to calculate the shear and bending stresses and then I used von mises yield criterion to calculate where the largest load at each x.

The result I got was unexpected. I was expecting for the maximum stress to occur at the neutral axis and then gradually move to the farthest point from the neutral axis. This was not what I got. The script calculated that the maximum stress would occur at the neutral axis in the beginning, stay that way for while and then suddenly jump to the outermost point.

The script is in python and requires numpy and matplotlib. s is the distance from the top of the cross-section, so the distance to the neutral axis is 0.5*h. The cross-section at a rectangle with height h=20[cm] and thickness b=2.5[mm].

import numpy as np
from math import sqrt
import matplotlib.pyplot as plt

L = .1
V = 60.e3
b = 2.5e-3
h = 0.20
I = 1./12.*b*h**3.

def main():
X = np.linspace(0,-L, 100)
S = np.linspace(0,h, 1000)
Max = [[], [], []]

for x in X:
x = abs(x)
sigmaMax = 0
yMax = 0
for s in S:
sigma = sqrt(Bend(s, x)**2 + 3*Shear(s)**2)
if sigma > sigmaMax:
sigmaMax = sigma
yMax = 0.5*h-s

Max[0].append(-x)
Max[1].append(yMax)
Max[2].append(sigmaMax)

beam = Beam()
plt.plot(beam[0],beam[1])
plt.plot(Max[0],Max[1])
plt.plot(Max[0],Max[1], ".")
plt.show()

return 0

def Bend(s,x):
return -x*V*(0.5*h-s)/(I)

def Shear(s):
return V/I*(0.5*h*s-0.5*s**2.)

def Beam():
Points = [[],[]]

Points[0].append(-L)
Points[1].append(0.5*h)

Points[0].append(-L)
Points[1].append(-0.5*h)

Points[0].append(0)
Points[1].append(-0.5*h)

Points[0].append(0)
Points[1].append(0.5*h)

Points[0].append(-L)
Points[1].append(0.5*h)

return Points

if __name__ == "__main__":
main()


The blue rectangle is the beam from the side. The green line with the red dots is where the maximum stress occurs at each cross-section.

-