from math import sqrt, pi
Del=10#
k=500#
W=k*Del#
#Let load arm be l1
l1=200#
#Let effort arm be l2
l2=500#
P=W*l1/l2#
Ro=sqrt(W**2+P**2)#
Ta=40#
d=sqrt(Ro*4/(2*pi*Ta))#
d=10#
pb=10#
d1=sqrt(Ro/(pb*1.5))#
d1=20#
l=1.5*d#
t=10#
T=Ro*4/(2*pi*d1**2)#
M=(Ro/2*(l/2+t/3))-(Ro/2*l/4)#
sigb=32*M/(pi*d1**3)#
sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2)#
P=Ro/(l*d1)#
D=2*d1#
print " d1 is %0.1f mm "%(d1)#
print "\n D is %0.1f mm "%(D)#
from math import sqrt, pi
d1=80#
p=0.981#
Ta=40#
siga=80#
pa=15#
W=pi*(d1**2)*p/4#
P=W/8#
Ws=W-P#
d=sqrt(W*4/(pi*2*Ta))#
l=1.5*d#
D=2*d#
T=W/(2*pi*pa**2/4)#
M1=P*(700-87.5-(D/2))#
h=50#
b=h/4#
Z=b*h**2/6#
sigb=M1/Z#
pmax=80#
T=2465.6/h**2#
pmax=(sigb/2)+sqrt((sigb/2)**2+T**2)#
print " h is %0.2f mm "%(h)#
print "\n pmax is %0.2f MPa "%(pmax)#
#The difference in the value of pmax is due to rounding-off the digits.
from math import sqrt, pi
P=((4*360)+(2*360))/900#
Fv=4-2#
Fh=P#
Fr=sqrt(Fv**2+Fh**2)#
P1=4*0.36/0.9#
Rf=sqrt(4**2+1.6**2)#
d=sqrt(Rf*10**3/(15*1.25))#
d=16#
l=1.25*d#
T=Rf*10**3*4/(2*pi*d**2)#
D=2*d#
M1=Rf*10**3*(360-(D/2))#
pa=15#
h=80#
b=h/4#
Z=b*h**2/6#
sigb=M1/Z#
T=4310/(b*h)#
pmax=(sigb/2)+sqrt((sigb/2)**2+T**2)#
print "P is %0.1f KN "%(P)#
print "\npmax is %0.2f MPa "%(pmax)#
from math import sqrt, pi
l=360#
P=400#
Mh=2*P*l/3#
sigb=50#
l1=60#
d=(Mh*32/(pi*l1))**(1/3)#
d=30#
L=420#
siga=60#
H=20#
B=H/3#
Mx=P*(L-H/2)#
Tx=2*P*l/3#
sigb1=Mx*18/H**3#
Td=P/(B*H)#
Tr=17.17*Tx/H**4#
T=Tr+Td#
sigmax=(sigb1/2)+sqrt((sigb1/2)**2+T**2)#
Tmax=sqrt((sigb1/2)**2+T**2)#
T=P*L#
M=P*(l1+(2/3*l))#
Te=sqrt(T**2+M**2)#
Ta=40#
D=(Te*16/(pi*Ta))**(1/3)#
D=30# #Rounding off to nearest whole number
print "d is %0.1f mm "%(d)#
print "\nD is %0.1f mm "%(D)#
from math import sqrt, pi
l2=300#
l=450#
P=400#
Mx=2*P*l2/3#
siga=80#
dh=(Mx*32/(pi*siga))**(1/3)#
dh=22#
L=(2*l2/3)+l#
T=P*L#
Ta=40#
d=(T*16/(pi*Ta))**(1/3)#
d=35#
d1=1.6*d#
Th=T*16*d1/(pi*(d1**4-d**4))#
l1=1.5*d#
My=P*(L-(d1/2))#
B=dh#
H=sqrt(3.66*75)#
H=30#
Mz=P*l1/2#
Te=sqrt(T**2+Mz**2)#
d2=(Te*16/(pi*Ta))**(1/3)#
d2=32#
b=d/4#
b=9# #Rounding off to nearest whole number
t=d/6#
t=6# #Rounding off to nearest whole number
print " d is %0.1f mm "%(d)#
print "\n dh is %0.1f mm "%(dh)#
print "\n d1 is %0.1f mm "%(d1)#
print "\n l1 is %0.1f mm "%(l1)#
print "\n d2 is %0.1f mm "%(d2)#
print "\n b is %0.1f mm "%(b)#
print "\n t is %0.1f mm "%(t)#
from math import sqrt, pi
L=450#
P=700#
T=P*L#
Ta=50#
d=(T*16/(pi*Ta))**(1/3)#
d=32#
d1=1.6*d#
d1=52# #Rounding off to nearest whole number
l1=1.25*d#
My=P*(L-d1/2)#
sigb=65#
H=(My*18/sigb)**(1/3)#
H=45#
B=H/3#
T1=P/(B*H)#
sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2)#
Mx=P*l1/2#
Te=sqrt((T)**2+(Mx**2))#
d2=(Te*16/(pi*Ta))**(1/3)#
d2=d2+6#
d2=38# #Rounding off to nearest whole number
print " d is %0.1f mm "%(d)#
print "\n d1 is %0.1f mm "%(d1)#
print "\n l1 is %0.1f mm "%(l1)#
print "\n B is %0.1f mm "%(B)#
print "\n H is %0.1f mm "%(H)#
print "\n d2 is %0.1f mm "%(d2)#