Chapter1-Analysis of stress

Ex1-page13

In [6]:
##Mohr's circle
#calculate centre of circle and max and min stress and principal stress and maxi shearing stress
import numpy
from numpy.linalg import inv
import math
sigma=((40+80)/2.)
print'%s %.2f %s'%("center of the circle in MPa = ",sigma,"")

##solution a
x=((80-40)**2.);
y=30**2.;
sigma1=60.+math.sqrt((.25*x)+y)
print'%s %.2f %s'%("maxi pricipal stress in MPa = ",sigma1,"");## print'%s %.2f %s'%laying result
sigma2=60.-math.sqrt((.25*x)+y)
print'%s %.2f %s'%("mini pricipal stress in MPa = ",sigma2,"");## print'%s %.2f %s'%laying result
theta1=((math.atan((30./20.))/2)*57.3)
print'%s %.2f %s'%("pricipal stresses in degree",theta1,"");## print'%s %.2f %s'%laying result
theta2=(((math.atan(30/20.))+180.)/2.)*57.3
print'%s %.2f %s'%("pricipal stresses in degree",theta2,"");## print'%s %.2f %s'%laying result

##solution b
tau=math.sqrt((.25*x)+y)
print'%s %.2f %s'%("maxi shearing stress in MPa = ",tau,"");## print'%s %.2f %s'%laying result
theta3=theta1+45.
print'%s %.2f %s'%("stress in MPa = ",theta3,"");## print'%s %.2f %s'%laying result
theta4=theta2+45
print'%s %.2f %s'%("stress in MPa = ",theta4,"");## print'%s %.2f %s'%laying result

##final solution in matrix form
p=([80 ,30, 30 ,40])
print(p) 
q=([sigma1, 0 ,0 ,sigma2])
print(q)
r=([sigma, -tau, -tau, sigma])
print(r)
center of the circle in MPa =  60.00 
maxi pricipal stress in MPa =  96.06 
mini pricipal stress in MPa =  23.94 
pricipal stresses in degree 28.16 
pricipal stresses in degree 5185.16 
maxi shearing stress in MPa =  36.06 
stress in MPa =  73.16 
stress in MPa =  5230.16 
[80, 30, 30, 40]
[96.05551275463989, 0, 0, 23.944487245360108]
[60.0, -36.05551275463989, -36.05551275463989, 60.0]

Ex2-pg14

In [1]:
##Mohr's circle
#calculate circle and radius of circle and oriention of the stresses in MPA
import math
radius=((14+28)/2.)
print'%s %.2f %s'%("radius of the circle in degree = ",radius,"")
sigma1=(7+radius *math.cos(60/57.3))
print'%s %.2f %s'%(" the circle in MPa = ",sigma1,"")
sigma2=(7-radius *math.cos(60/57.3))
print'%s %.2f %s'%(" the circle in MPa = ",sigma2,"")
tau1=radius*math.sin(60./57.3)
print'%s %.2f %s'%(" orientation of the stresses in MPa = ",tau1,"")
radius of the circle in degree =  21.00 
 the circle in MPa =  17.50 
 the circle in MPa =  -3.50 
 orientation of the stresses in MPa =  18.19