# Variables
length =10 #ft
delta =0.024 #in
# Calculations
epsilon =delta/(length*12)
# Results
print "Axial strain =%.4f in/in"%(epsilon)
import math
# Variables
drop = 5. #in
width = 8. #ft
# Calculations
deltaMB =math.sqrt((width*12/2)**2 +drop**2) - (width*12/2)
epsilon =deltaMB/(width*12/2)
# Results
print "Strain in the wire = %.5f in/in"%(epsilon)
import math
# variables and Calculations
E = 30000./0.001
deltaP1 = 66000. # psi
deltault = 116000 # psi
deltarup = 103000 # psi
Pf = round(deltarup*math.pi/4*0.505**2,-2)
deltarup_ = round(Pf/(math.pi*0.425**2/4),-3)
percent_elongation = (2.375 - 2)/2*100
percent_reduction = ((math.pi*0.505**2/4) - (math.pi*0.425**2/4))/(math.pi*0.505**2/4) * 100
# Results
print "E = %.1e psi"%E
print "The load of failure Pf = %d lb"%Pf
print "Rupture strength : %.d psi"%deltarup_
print "Percent elongation = %.1f %%"%percent_elongation
print "Percent reduction in area = %.1f %%"%percent_reduction
# note : last answer is wrong in book. please check.
import math
# Variables
length =15. #in
tension =5000. #lb
UltStress =20000. #psi
delta =0.005 #in
# Calculations
E =30*10**6 #psi
A1 =tension/UltStress
A2 =tension*length/(delta*E)
if A1 >= A2:
A =A1
else:
A =A2
Dia =math.sqrt(4*A/math.pi)
# Results
print "diameter required = %.3f in"%( Dia)
import math
# Variables
L1 =5.
L2 =10.
T1 =2.5
T2 =5.
T3 =5.
T4 =5.
T5 =2.5
E =30.*10**6 #psi
outDia =2. #in
# Calculations # Results
inDia =1./8 #in
RE =(T1+T2+T3+T4+T5)/2 #kips
RA =RE
GH =(RA*L2-T2*L1-T1*L2)/4
print "Stress in GH =%.1f kips"%(GH)
A =math.pi*(outDia**2-(outDia-2*inDia)**2)/4
delta =GH*10**3 *(L1*12)/(E*A)
print " Deformation =%.3f in"%(delta)
sigma =GH*10**3 /A
print " Stress =%d psi"%(round(sigma,-3))
SF =65000/sigma
print " Factor of safety =%.3f "%(SF)
import math
from numpy import linalg
# Variables
Es = 30.*10**6 #psi
As = 1. #in**2
Ea = 10.*10**6 #psi
Aa = 2. #in**2
Ls = 10. #ft
La = 5. #ft
# Calculations
A =[[(Ls/(Es*As)) ,(-La/(Ea*Aa))],[1 ,1]]
b = [0,1]
c = linalg.solve(A,b)
Fa = c[0]
Fb = c[1]
d = Fb*Ls
# Results
print 'distance = %.2f ft'%(d)
import math
# Variables
P =40000. #lb
L =15. #in
delta =0.0032 #in
dia =4. #in
axial =0.0032 #in
lateral =0.00022 #in
# Calculations # Results
E =P*L/(delta*math.pi*(dia/2)**2)
print "Modulus of elasticity =%.2f psi"%(E)
Mu =lateral*L/(axial*dia)
print "Poisson ratio = %.2f"%(Mu)
import math
# Variables
alpha =11.2*10**(-6) #in/in/F
E =15*10**6 #psi
L =60. #in
deltaT1 =0.01 #in
T2 =50 #F
# Calculations # Results
deltaT =deltaT1/(alpha*L)
print "The temperature increase necessary to cause free end to touch B =%.1f F"%(deltaT)
sigma =(alpha*L*T2-deltaT1)*E/L
print "Stress in the rod =%d psi"%(sigma+1)
# Variables
weight =25000. #Kg
A =2 #sq.in
alphaS =6.5*10**(-6) #in/in/F
alphaB =11.2*10**(-6) #in/in/F
Es =30*10**6 #psi
Eb =15*10**6 #psi
# Calculations # Results
deltaT =weight/(Es*A*(alphaB-alphaS))
print "Net temperature drop =%.1f F"%(deltaT)
import math
# Variables
S =5. #in
Al =6. #in
alphaS =6.5*10**(-6) #in/in/F
alphaAl =13.1*10**(-6) #in/in/F
Es =30.*10**6 #psi
EAl =10.*10**6 #psi
As =1. #in**2
AAl =2. #in**2
T =50. #F
dia =1 #in
# Calculations # Results
P =(alphaS*S*12*T + alphaAl*Al*12*T)/(S*12/(Es*As) + Al*12/(EAl*AAl))
print "Shearing force = %d lb"%(round(P,-1))
T =P/(math.pi*(dia/2.)**2)
print " The shear stress in the pin =%d psi"%(round(T,-2))
# Variables
edge = 2. #in
height =3. #in
F = 20000. #lb
deltaS = 0.00234 #in
deltaA = 0.00088 #in
# Calculations # Results
E = F*height/(deltaA*edge*edge)
print "Modulus of elasticity = %.1e psi"%(E)
G =F*height/(deltaS*edge*edge)
print " Modulus of Rigidity = %.1e psi"%(G)
Mu =E/(2*G) -1
print " Poisson ratio = %.1f "%(Mu)