from __future__ import division
from math import sqrt, pi, cos, sin
R=1200#
b=300#
t=150#
N=500#
m=7100*10**-9*b*t#
Ar=b*t#
Aa=Ar/4#
C=(20280/t**2)+0.957+(Ar/Aa)#
w=2*pi*N/60#
V=w*R*10**-3#
siga=2*10**3*m*V**2/(C*Aa*3)#
theta=30*pi/180#
alpha=30*pi/180#
x1=10**3*m*(V**2)/(b*t)#
y1=cos(theta)/(3*C*sin(alpha))#
z1=2000*R*10**-3/(C*t)*((1/alpha)-(cos(theta)/sin(alpha)))#
sigrr1=x1*(1-y1+z1)#
theta=0*pi/180#
x2=10**3*m*(V**2)/(b*t)#
y2=cos(theta)/(3*C*sin(alpha))#
z2=2000*R*10**-3/(C*t)*((1/alpha)-(cos(theta)/sin(alpha)))#
sigrr2=x2*(1-y2-z2)#
print "axial stress is %0.2f MPa "%(siga)#
print "\ntensile stress for theta=30deg is %0.1f MPa "%(sigrr1)#
print "\ntensile stress for theta=0deg is %0.2f MPa "%(sigrr2)#
#The difference in the value of sigrr1 and sigrr2 is due to rounding-off of values.
from math import asin, cos, sqrt,pi
N=350#
theta1=asin(sqrt((3-0.6)/4))#
theta1=theta1*180/pi#
theta2=(180)-theta1#
#Ti=16000+6000*sind(3*theta)#
#To=16000+3600*sind(theta)#
a=-3600*(cos(pi/180*theta2)-cos(pi/180*theta1))#
b=2000*(cos(pi/180*3*theta2)-cos(pi/180*3*theta1))#
c=a+b#
delU=c#
Ks=0.05#
w=2*pi*N/60#
I=delU/(Ks*w**2)#
V=25#
Ir=I*0.95#
R=V/w#
Mr=Ir/R**2#
rho=7150#
t=sqrt(Mr*(10**6)/(2*pi*R*2*rho))#
b=2*t#
print "t is %0.2f mm "%(t)#
print "\nb is %0.2f mm "%(b)#
print "\nR is %0.3f m "%(R)#
from math import sqrt,pi
N=300#
Ks=0.03#
rho=7150#
Kr=0.9#
w=2*pi*N/60#
WD=(300*2*pi)+(4*pi*200/4)#
Tm=400#
delU=pi*200/16#
Ir=Kr*delU/(w**2*Ks)#
R=Ir/(rho*1.5*0.1*0.1*2*pi)#
R=R**(1/5)#
t=0.1*R*1000#
b=1.5*t#
print "t is %0.2f mm "%(t)#
print "\nb is %0.2f mm "%(b)#
print "\nR is %0.4f m "%(R)#
from math import sqrt,pi
d=20#
t=12#
Tus=450#
Pmax=pi*d*t*Tus#
WD=Pmax*t/2*10**-3#
n=0.95#
Wi=WD/n#
delU=5*Wi/6#
N=300#
w=2*pi*N/60#
Ks=0.2#
I=delU/(Ks*w**2)#
Ir=I*0.9#
R=0.5#
m=Ir/R**2#
rho=7150#
t=sqrt(m*10**6/(rho*2*pi*R*2))#
b=2*t#
print "t is %0.1f mm "%(t)#
print "\nb is %0.1f mm "%(b)#
print "\nR is %0.1f m "%(R)#
from math import sqrt,pi
U=(500*2*pi)+(3*pi*500/2)#
Tm=U/(2*pi)#
delU=2.25*pi*125/2#
Ks=0.1#
N=250#
w=2*pi*N/60#
I=delU/(Ks*w**2)#
t=0.03#
rho=7800#
R=(I*2/(pi*rho*t))**(1/4)#
V=R*w#
v=0.3#
sigmax=rho*V**2*(3+v)/8*10**-6#
print "R is %0.3f m "%(R)#
print "\nsigmax is %0.2f MPa "%(sigmax)#
from math import sqrt,pi
N=1.5*8*60#
l=200#
t=1.5/2#
W=350*10**3#
WD=0.15*l*W*10**-6#
n=0.9# #since frictional effect is 10%, effciency of system is 90%
Wi=WD/n#
L=400#
delU=(L-(0.15*l))/(L)*10**3*Wi#
Ks=0.12#
w=2*pi*N/60#
I=delU/(Ks*w**2)#
Ir=I*0.9#
R=0.7#
m=Ir/R**2#
rho=7150#
t=sqrt(m*10**6/(rho*2*pi*R*1.5))#
b=1.5*t#
print "t is %0.1f mm "%(t)#
print "\nb is %0.1f mm "%(b)#
from math import sqrt,pi
N=144#
#Let n be no. of punches/ min
n=8#
#Let t be timr for 1 punch
t=60/n#
theta=N/60*2*pi*0.6#
T=2.1#
U=T*theta#
#Let U1 be revolution of crankshaft in t sec
U1=t*N/60*2*pi#
delU=(U1-theta)/U1*U*10**3#
w=2*pi*1440/60#
Ks=0.1#
I=delU/(Ks*w**2)#
Ir=I*0.9#
rho=7100#
R=Ir/(rho*0.2*0.1*2*pi)#
R=R**(1/5)#
t=0.1*R*1000#
b=0.2*R*10**3#
t=40#
b=80#
R=400#
# printing data in scilab o/p window
print "t is %0.0f mm "%(t)#
print "\nb is %0.0f mm "%(b)#
print "\nR is %0.0f mm "%(R)#