Chapter2-Principal planes and principal stress

Ex1-pg37

In [1]:
import math
#calculate Normal stress intensity and Tangential stress intensity and Resultant stress intensity and angle
p_1 = 5.;##principal stress in tons/in^2
p_2 = 5./2.;##principal stress in tons/in^2
theta = 50*math.pi/180;##angle in degrees
p_n = p_1*math.cos(theta)**2+p_2*math.sin(theta)**2;##normal stress intensity
p_t = (p_1-p_2)*math.sin(theta)*math.cos(theta);##tangential stress intensity
p = math.sqrt((p_1*math.cos(theta))**2+(p_2*math.sin(theta))**2);##resultant intensity of stress
alpha = math.atan((p_2*math.sin(theta))/(p_1*math.cos(theta)));##in radians
alpha = alpha*180/math.pi;##in degrees
print'%s %.2f %s'%('Normal stress intensity p_n = ',p_n,' tons/in^2');
print'%s %.2f %s'%('h Tangential stress intensity p_t = ',p_t,' tons/in^2');
print'%s %.2f %s'%(' Resultant stress intensity p = ',p,'tons/in^2');
print'%s %.2f %s'%(' angle alpha p_n = ',alpha,' degrees');

##there is an error in the answer given in text book
Normal stress intensity p_n =  3.53  tons/in^2
h Tangential stress intensity p_t =  1.23  tons/in^2
 Resultant stress intensity p =  3.74 tons/in^2
 angle alpha p_n =  30.79  degrees

Ex3-pg47

In [2]:
import math
#calculate The inclination of principal planes to the axis of the bolt and  p_2 and  Maximum shear stress is p_max and stress which acting alone will produce the same maximum strain 
d = 3./4. ;##inches
P = 2.;##tons
Q = 0.5;##tons
m = 4.;
A = 0.25*math.pi*d**2;##in^2
p = P/A ;##tons/in^2
q = Q/A;##tons/in^2
theta = 0.5*math.atan(2.*q/p);##radians
theta1 = theta*180/math.pi;##degrees
theta2 = theta1+90;##degrees
print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',theta1,'degres') 
print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',180-theta2,'degrees') 
print'%s %.2f %s'%('The inclination of maximum shear planes to the axis of the bolt will be',theta1+45,'degress')
print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',180-theta2-45,'degrees')

p_1 = 0.5*p+math.sqrt(0.25*p**2+q**2);##tons/in^2
p_2 = 0.5*p-math.sqrt(0.25*p**2+q**2);##tons/in^2
p_max = 0.5*(p_1-p_2);##tons/in^2
p_s = p_1-(p_2/m);##tons/in^2 
print'%s %.2f %s'%('The principal stresse are given by p_1 =',p_1,'tons/in^2.,tensile')
print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2.,compressive')
print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2 .,compressive');
print'%s %.2f %s'%('Maximum shear stress is p_max =',p_max,'tons/in^2');
print'%s %.2f %s'%('The stress which acting alone will produce the same maximum strain is given by,',p_s,'tons/in^2');

##there is an error in the answer given in text book
The inclination of principal planes to the axis of the bolt will be 13.28 degres
The inclination of principal planes to the axis of the bolt will be 76.72 degrees
The inclination of maximum shear planes to the axis of the bolt will be 58.28 degress
The inclination of principal planes to the axis of the bolt will be 31.72 degrees
The principal stresse are given by p_1 = 4.79 tons/in^2.,tensile
p_2 = -0.27 tons/in^2.,compressive
p_2 = -0.27 tons/in^2 .,compressive
Maximum shear stress is p_max = 2.53 tons/in^2
The stress which acting alone will produce the same maximum strain is given by, 4.86 tons/in^2

Ex4-pg51

In [4]:
import math
#calculate The principal stresses and The maximum shear stress and the planes offering it being inclined and the normal stress intensity 
q = 2.;##tons/in^2
p = 5.;##tons/in^2
p_dash = 2.;##tons/in^2
theta = 0.5*math.atan(2*q/(p-p_dash));##radians
theta1 = theta*180/math.pi;##degrees
theta2 = theta1+90;##degrees
p_1 = 0.5*(p+p_dash)+math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2
p_2 = 0.5*(p+p_dash)-math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2
q_max = 0.5*(p_1-p_2);##tons/in^2
print'%s %.2f %s'%('The principal stresses are p_1 =',p_1,'tons/in^2 .,tensile')
print'%s %.2f %s'%('The principal stresses arep_2 =',p_2,'tons/in^2., tensile');
print'%s %.1f %s'%('The maximum shear stress is',q_max,'tons/in^2.,') 
print'%s %.2f %s'%('the planes offering it being inclined at',theta1+45,'degrees') 
print'%s %.2f %s'%('the planes offering it being inclined at',theta2+45,'degrees')
print'%s %.2f %s'%('to the plane having the normal stress intensity of',p,'tons/in^2.')
##there is an error in the answer given in text book
The principal stresses are p_1 = 6.00 tons/in^2 .,tensile
The principal stresses arep_2 = 1.00 tons/in^2., tensile
The maximum shear stress is 2.5 tons/in^2.,
the planes offering it being inclined at 71.57 degrees
the planes offering it being inclined at 161.57 degrees
to the plane having the normal stress intensity of 5.00 tons/in^2.

Ex5-pg51

In [2]:
import math
#calculate theta1 and theta2 and P_1 and P_2 and maximum shear intensity
p_res = 6.;##tons/in^2
p_dash = 4.;##tons/in^2
theta = 30.*math.pi/180.;##degrees
p_n = 4.;##tons/in^2
p = p_res*math.cos(theta);##tons/in^2
q = p_res*math.sin(theta);##tons/in^2
L = 2*q/(p-p_dash);
theta = 0.5*math.atan(2*q/(p-p_dash));
theta1 = theta*180/math.pi;##degrees
theta2 = theta1+90;##degrees
p_1 = 0.5*(p+p_dash)+math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2
p_2 = 0.5*(p+p_dash)-math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2
p_max = 0.5*(p_1-p_2);##tons/in^2
print'%s %.2f %s'%('Theta1 =',theta1,'degrees') 
print'%s %.2f %s'%('Theta2 =',theta2,'degrees')
print'%s %.2f %s'%('p_1 =',p_1,'tons/in^2.,tensile')
print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2.,tensile')
print'%s %.2f %s'%('The maximum shear intensity will be',p_max,'tons/in^2 across the planes of maximum shear.');
Theta1 = 39.36 degrees
Theta2 = 129.36 degrees
p_1 = 7.66 tons/in^2.,tensile
p_2 = 1.54 tons/in^2.,tensile
The maximum shear intensity will be 3.06 tons/in^2 across the planes of maximum shear.

Ex6-pg52

In [7]:
import math
#calculate tensiles and compressive 
p_1 = 7.;##tons/in^2
p_2 = 4.;##tons/in^2
p_3 = 3.;##tons/in^2
m = 4.;
E = 13000.;##tons/in^2
e_1 = (p_1/E)+(p_2/(m*E))-(p_3/(m*E));
e_2 = (p_2/E)+(p_1/(m*E))+(p_3/(m*E));
e_3 = (p_3/E)-(p_1/(m*E))+(p_2/(m*E));
print'%s %.4f %s'%('e_1 =',e_1,'tensile')
print'%s %.4f %s'%('e_2 =',e_2,'compressive')
print'%s %.4f %s'%('e_3 =',e_3,'tensile')
e_1 = 0.0006 tensile
e_2 = 0.0005 compressive
e_3 = 0.0002 tensile

Ex7-pg53

In [3]:
import math
#calculate the contraction in the length 
a = 2.;##inches
l = 6.;##inches
E = 13000.;##tons/In^2
m = 1./0.3;
P = 20.;##tons
p_1 = P/a**2;##tons/in^2
p_2 = p_1/(2.*(m-1));##tons/in^2
e_1 = (5.-0.6*p_2)/E;##tons/in^2
del_l = e_1*l;##inches
print'%s %.4f %s'%('The contraction in the length del_l =',del_l,'inches');
The contraction in the length del_l = 0.0020 inches