from math import pi
t=20#
p=100#
d=25#
sigt=40#
P=(p-d)*t*sigt#
Ts=(4*P)/(pi*d**2)#
sigb=P/(d*t)#
print " P is %0.0f N "%(P)#
print "\n Ts is %0.2f MPa "%(Ts)#
print "\n sigb is %0.0f MPa "%(sigb)#
from math import pi
t=22#
t1=5*t/8#
d=30#
p=100#
sigt=75#
P=(p-d)*t*sigt#
Ts=(2*P)/(pi*d**2)#
sigb=P/(d*t)#
P=P*10**-3
print " P is %0.1f kN "%(P)#
print "\n Ts is %0.1f MPa "%(Ts)#
print "\n sigb is %0.0f N/mm**2 "%(sigb)#
from math import pi
t=15#
t1=5*t/8#
d=25#
n=2#
Ta=80#
sigta=100#
sigba=120#
Ps=n*1.875*pi*d**2*Ta/4#
Pb=n*d*t*sigba#
p=Pb/(t*Ta)+d#
Pp=p*t*Ta#
n=Pb/Pp#
print " p is %0.0f mm "%(p)#
print "\n n is %0.2f "%(n)#
from math import sqrt, pi
b=200#
t=16#
d=6*sqrt(t)#
sigta=80#
Ta=60#
sigba=100#
Pt=(b-d)*t*sigta#
Ps=1.875*pi*d**2*Ta/4#
Pb=d*t*sigba#
n1=Pt/Pb#
n1=6#
Pt2=((b-(2*d))*t*sigta)+Pb#
Pt3=((b-(3*d))*t*sigta)+(3*Pb)#
Pp=b*t*sigta#
n2=Pt/Pp#
n2=n2*100#
print " d is %0.0f mm "%(d)#
print "\n n1 is %0.0f "%(n1)#
print "\n Pt is %0.0f N "%(Pt)#
print "\n Pt2 is %0.0f N "%(Pt2)#
print "\n Pt3 is %0.0f N "%(Pt3)#
print "\n n2 is %0.0f "%(n2)#
#Answer to strength of rivet in bearing 'Pb' is calculated incorrectly in the book, hence Pt2,Pt3 is calculated subsequently incorrect.
from math import atan
a=50#
b=75#
P=36*10**3#
d=24#
Ta=60#
n=9#
A=pi*d**2/4#
Td=P/(n*A)#
theta=atan(b/a)#
Ts=54.64#
r2=90.184#
e=A*29575.7/P#
print " e is %0.1f mm "%(e)#
from math import sqrt,pi
P=12*10**3#
Tmax=100#
n=6#
e=50+50+(5/2)#
T=P*e#
Td=P/n#
ra=125#
k=T/((2*125**2)+(2*75**2)+(2*25**2))#
Tr=(k*ra)+Td#
A=Tr/Tmax#
d=sqrt(A*4/pi)#
d=12#
print " d is %0.0f mm "%(d)#
from __future__ import division
from math import sqrt,pi
t=15#
d=6*sqrt(t)#
d=24#
sigta=75#
sigba=105#
Ta=60#
n=4#
Pt=n*pi*d**2*Ta/4#
x=d*t*sigta#
y=2*t*sigta#
p=(Pt+x)/y#
p=60#
C=4.17#
pmax=(C*t)+41.28#
Pt1=(y*p)-x#
Ps=n*pi*d**2*Ta/4#
Pb=n*d*t*sigba#
S=2*p*t*sigta#
n=Pt1/S#
n=n*100#
print " n is %0.f "%(n)#
from math import sqrt,pi
D=1500#
p=2#
nt=0.75#
sigut=420#
FOS=5#
sigta=sigut/FOS#
t=p*D/(2*sigta*nt)#
t=24#
d=6*sqrt(t)#
d=30#
Ta=330/5#
sigba=640/5#
Ps=2*1.875*pi*(d**2)*Ta/4#
p=(Ps/(t*sigta))+d#
p=117#
t1=5*t/8#
Pt=(p-d)*t*sigta#
Pp=p*t*sigta#
Pb=2*d*t*sigba#
n=Ps/Pb#
n=n*100#
print " n is %0.0f "%(n)#
from math import sqrt,pi
D=1200#
p=2.5#
sigba=110#
Pa=pi*D**2*p/4#
nt=0.8#
sigta=80#
t=p*D/(2*sigta*nt)#
t=24#
d=6*sqrt(t)#
d=30#
Ta=55#
Ps=pi*(d**2)*Ta/4#
Np=Pa/Ps#
Np=74#
nr=Np/2#
p=pi*(D+t)/nr#
pb=2*d#
m=1.5*d#
Pt=(p-d)*t*sigta#
Ps=2*Ps#
Pb=2*d*t*sigba#
Pp=p*t*sigta#
n=Ps/Pp#
n=n*100#
print " n is %0.0f "%(n)#