from __future__ import division
from math import atan, tan, cos , sin, degrees, pi
# Given that
alpha = 10 # Rake angle in Degree
t = 0.4 # Chip thickness in mm
T = 0.15 # Uncut chip thickness in mm
r = T/t
phi = degrees(atan((r*cos(alpha*pi/180))/(1-r*sin(alpha*pi/180))))
gama = 1/tan(phi*pi/180) + tan((phi-alpha)*pi/180)
print "Shear plane angle = %0.1f°, \nMagnitude of the shear strain = %0.2f"%(phi,gama)
# Given that
t1 = 0.25 # Undercut thickness in mm
t2 = 0.75 # Chip thickness in mm
w = 2.5 # Width in mm
alpha = 0 # Rake angle in Degree
Fc = 950 # Cutting force in N
Ft = 475 # Thrust force in N
r = t1/t2
mu = ((Fc*sin(alpha*pi/180)) + (Ft*cos(alpha*pi/180)))/((Fc*cos(alpha*pi/180))-(Ft*sin(alpha*pi/180)))
phi = degrees(atan((r*cos(alpha*pi/180))/(1-r*sin(alpha*pi/180))))
As = t1*w/sin(phi*pi/180)
Fs = Fc*cos(phi*pi/180) - Ft*sin(phi*pi/180)
T_s = Fs/As
print """Coefficient of the friction between tool and the chip = %0.1f,
The ultimate shear stress of the material = %0.1f N/mm**2"""%(mu,T_s)
# Given that
alpha = 10 # Rake angle of tool in Degree
v = 200 # Cutting speed in m/min
t1 = 0.2 # Uncut thickness in mm
w = 2 # Width of cut in mm
mu = 0.5 # Avg value of the cofficient of tbe friction
T_S = 400 # Shear stress of the work material in N/mm**2
lamda = degrees(atan(mu))
phi = (90 + alpha - lamda)/2
Fs = (w*t1*T_S)/(sin(phi*pi/180))
R = Fs/(cos((phi+lamda-alpha)*pi/180))
Fc = R*(cos((lamda-alpha)*pi/180))
Ft = R*(sin((lamda-alpha)*pi/180))
print "Shear angle = %0.1f°, \nCutting force = %0.f N, \nThrust force = %d N,"%(phi,Fc,Ft)
# Answer in the book for cutting force is given as 420 N and for thrust force is given as 125 N
# Given that
alpha = 10 # Rake angle of tool in Degree
v = 200 # Cutting speed in m/min
t1 = 0.2 # Uncut thickness in mm
w = 2 # Width of cut in mm
mu = 0.5 # Avg value of the cofficient of tbe friction
T_S = 400 # Shear stress of the work material in N/mm**2
Cm = 70 # Machining constant in Degree
lamda = degrees(atan(mu))
phi = (Cm + alpha - lamda)/2
Fs = (w*t1*T_S)/(sin(phi*pi/180))
R = Fs/(cos((phi+lamda-alpha)*pi/180))
Fc = R*(cos((lamda-alpha)*pi/180))
Ft = R*(sin((lamda-alpha)*pi/180))
# Using Lee and Shaffer relation
phi_ = 45-lamda+alpha
Fs_ = (w*t1*T_S)/(sin(phi_*pi/180))
R_ = Fs_/(cos((phi_+lamda-alpha)*pi/180))
Fc_ = R_*(cos((lamda-alpha)*pi/180))
Ft_ = R_*(sin((lamda-alpha)*pi/180))
print """Shear angle = %0.1f°,
Cutting force = %0.2f N,
Thrust force = %0.2f N
Using Lee and Shaffer relation-
Shear angle = %0.2f°,
Cutting force = %0.2f N,
Thrust force = %0.2f N,"""%(phi,Fc,Ft,phi_,Fc_,Ft_)
# Answer in the book for cutting force is given as 486.9 N and for thrust force is given as 144.9 N , When using Lee and Shaffer relation answer in the book for cutting force is given as 481.9 N and for trust force is given as 160.6 N
# Given that
t1 = 0.25 # Uncut thickness in mm
w = 2.5 # Width of cut in mm
U_0 = 1.4 # In J/mm**3
alpha = 0 # Rake angle in degree
mu = 0.5 # Cofficient of the friction
T_s = 400 # Shear stress in N/mm**2
lamda = degrees(atan(mu))
Fc = 1000*(t1*w*U_0)*((t1)**(-.4))
phi = 45 + alpha - degrees(atan(mu))
Fc_ = (w*t1*T_s*cos((lamda-alpha)*pi/180))/((sin(phi*pi/180)) *cos((phi+lamda-alpha)*pi/180))
print """The order of magnitude of cutting force = %d N,
Using Lee and Shaffer relation-
The order of magnitude of cutting force = %d N."""%(Fc,Fc_)
# Answer in the book for cutting force is given as 1517 N
from math import log, sqrt
# Given that
v = 2 # Cutting speed in m/sec
D = 7200 # Density of mild steel in kg /m**3
k = 43.6 # Thermal conductivity in W/m-°c
c = 502 # Specific heat of the material in J/kg-°c
t1 = 0.25 # Uncut thickness in mm
w =2 # Width of cut in mm
theta_0 = 40 # Initial temp of the workpiece in Degree
alpha = 0 # Rake angle in degree
mu = 0.5 # Cofficient of the friction
T_s = 400e6 # Shear stress in N/m**2
lamda = degrees(atan(mu))
phi = 45 + alpha - lamda
Fs = (w*t1*T_s)*(10**-6)/(sin(phi*pi/180))
R = Fs / (cos((phi+lamda-alpha)*pi/180))
Fc = R *(cos((lamda-alpha)*pi/180))
r = sin(phi*pi/180)/(cos((phi-alpha)*pi/180))
Ft= Fc *(tan((lamda - alpha)*pi/180))
F = Fc *(sin(alpha*pi/180))+Ft*(cos(alpha*pi/180))
Ws = F*r*v
Wp = Fc*v-F*r*v
zeta = D*c*v*t1*(10**-3)/k
zeta_ = zeta*tan(phi*pi/180)
nu = 0.15 *(log(27.5/(zeta_)))
theta_P = (1-nu)*Wp/(D*c*v*t1*w*(10**-6))
theta_S = 1.13 *(sqrt(1/(D*c*v*t1*(10**-3)*k*(1+tan((phi-alpha)*pi/180))))*(Ws/w)*(10**3))
theta = theta_0+theta_S+ theta_P
print " \n Maximum temperature along the rake face of the tool = %0.1f°C."%theta
# Answer in the book is given as 823°C
# Given that
theta_ = 40 #Ambient temperature in°C
v = 2 # Cutting speed in m/sec
D = 7200 # Density of mild steel in kg /m**3
k = 43.6 # Thermal conductivity in W/m-°c
c = 502 # Specific heat of the material in J/kg-°c
t1 = 0.25 # Uncut thickness in mm
w =2 # Width of cut in mm
alpha = 0 # Rake angle in degree
mu = 0.5 # Cofficient of the friction
T_s = 400e6 # Shear stress in N/m**2
H = 350 # Hardness of SAE 1040 steel in HV(Vicker hardness)
lamda = degrees(atan(mu))
phi = 45 + alpha - lamda
Fs = (w*t1*T_s)*(10**-6)/(sin(phi*pi/180))
R = Fs / (cos((phi+lamda-alpha)*pi/180))
Fc = R *(cos((lamda-alpha)*pi/180))
r = sin(phi*pi/180)/(cos((phi-alpha)*pi/180))
Ft= Fc *(tan((lamda - alpha)*pi/180))
F = Fc *(sin(alpha*pi/180))+Ft*(cos(alpha*pi/180))
Ws = F*r*v
Wp = Fc*v-F*r*v
zeta = D*c*v*t1*(10**-3)/k
zeta_ = zeta*tan(phi*pi/180)
nu = 0.15 *(log(27.5/(zeta_)))
Theta_0v = ((1-nu)*Wp + Ws)/ (D*c*v*t1*w*(10**-6))
H_ = 1.5 *(H)
theta_lim = 700*((1-(H_/850))**(1/3.1))
v_lim = (theta_lim/309)**(1/0.5)
print " \n Maximum speed at which cutting is passible = %0.2f m/sec."%v_lim
# Given that
alpha = 0 # Rake angle in degree
gama = 3 # Clearance angle in Degree
w = 1 # Maximum length of flank wear allowed in mm
gama_ = 7 # Increased clearance angle in Degree
I_per = (((tan(gama_*pi/180))-(tan(gama*pi/180)))/tan(gama*pi/180))*100
print " \n Percentage increase in tool life = %d percent."%I_per
# Given that
d= 4 # Depth of cut in mm
f = 0.25 # Feed in mm/stroke
alpha = 10 # Rake angle in degree
shi = 30 # Principal cutting edge angle in Degree
mu =0.6 # Cofficient of friction between chip and tool
T_s = 340 # Ultimate shear stress of cast iron in N/mm**2
lamda = degrees(atan(mu))
phi = 45 +alpha-lamda
Fc = f*d*T_s*(cos((lamda-alpha)*pi/180))/((sin(phi*pi/180))*(cos((phi+lamda-alpha)*pi/180)))
Ft = Fc*(sin((lamda-alpha)*pi/180))/(cos((lamda-alpha)*pi/180))
Ff = Ft*(cos(shi*pi/180))
Fn = Ft*(sin(shi*pi/180))
print """The three components of machinig force are as follows-
Thrust force = %d N,
Feed force component = %d N,
Normal thrust force component = %d N."""%(Ft,Ff,Fn)
# Given that
d= 4 # Depth of cut in mm
f = 0.25 # Feed in mm/stroke
alpha = 10 # Rake angle in degree
shi = 30 # Principal cutting edge angle in Degree
mu =0.6 # Cofficient of friction between chip and tool
T_s = 340 # Ultimate shear stress of cast iron in N/mm**2
N = 60 # Cutting stroke/min
L = 200 # Length of the job in mm
H = 180 # Hardness of the workpiece in BHN
lamda = degrees(atan(mu))
phi = 45 +alpha-lamda
Fc = f*d*T_s*(cos((lamda-alpha)*pi/180))/((sin(phi*pi/180))*(cos((phi+lamda-alpha)*pi/180)))
Fc_ = Fc*(L/1000)
Wav =Fc_*N/60
t1 = f*cos(shi*pi/180)
U_0 = 0.81 # By using table 4.4 given in the book, In J/mm**3
Uc = U_0*((t1)**(-.4))
Q = f*d*L*N/60
Wav_ = Uc*Q
print "Avg power consumption = %d W,\nSpecific power consumption when hardness of the workpiece is 180 BHN = %d W."%(Wav,Wav_)
# Answer in the book for Specific power consumption is given as 294 W
# Given that
alpha_b = 6 # Back rake angle in Degree
alpha_s = 10 # Side rake angle in Degree
gama = 7 # Front clearance angle in Degree
gama_ = 7 # Side clearance angle in Degree
Shi = 10 # End cutting edge angle in Degree
shi = 30 # Side cutting edge angle in Degree
r= 0.5 # Nose radius in mm
k = tan(alpha_b*pi/180) * cos(shi*pi/180) - tan(alpha_s*pi/180) * sin(shi*pi/180)
print "The value of k=%0.4f,which is near to 0. Hence the case is close to orthogonal one.\n"%k
alpha= degrees(atan(((tan(alpha_b*pi/180)) * sin(shi*pi/180) ) + (tan(alpha_s*pi/180) * (cos(shi*pi/180))))/ (sqrt(1+((tan(alpha_b*pi/180)*cos(shi*pi/180)) - (tan(alpha_s*pi/180)*sin(shi*pi/180)))**(2))))
print "Normal rake angle = %0.1f°."%(alpha)
from math import ceil
# Given that
alpha_b = 6 # Back rake angle in Degree
alpha_s = 10 # Side rake angle in Degree
gama = 5 # Front clearance angle in Degree
gama_ = 7 # Side clearance angle in Degree
Shi = 10 # End cutting edge angle in Degree
shi = 30 # Side cutting edge angle in Degree
r= 0.55 # Nose radius in mm
d = 2.5 # Depth of cut in mm
f = 0.125 # Feed in mm/revolution
N = 300 # Rpm of the job
T_S = 400 # Ultimate shear stress of the workpiece in N/mm**2
mu = .6 # Cofficient of the friction between the tool and the chip
lamda = degrees(atan(mu))
alpha= degrees(atan(((tan(alpha_b*pi/180)) * sin(shi*pi/180) ) + (tan(alpha_s*pi/180) * (cos(shi*pi/180))))/ (sqrt(1+((tan(alpha_b*pi/180)*cos(shi*pi/180)) - (tan(alpha_s*pi/180)*sin(shi*pi/180)))**(2))))
phi = 45 + alpha - lamda
t1 = f*cos(phi*pi/180)
w = d/cos(phi*pi/180)
Fc = w*t1*T_S*(cos((lamda-alpha)*pi/180))/((sin(phi*pi/180))*(cos((phi+lamda-alpha)*pi/180)))
Ft = Fc*tan((lamda-alpha)*pi/180)
Ff = Ft*cos(shi*pi/180)
Fr = Ft*sin(shi*pi/180)
print "Component of the machining force are as follows -\n Feed force component = % d N, \n Normal thrust force component = % d N."%(ceil(Ff),ceil(Fr))
# Given that
D = 20 # Nominal diameter of the drill in mm
T_S = 400 # Shear yield stress of work material in N/mm**2
N = 240 # Rpm
f = 0.25 # Feed in mm/revolution
mu = 0.6 # Cofficient of friction
Beta = 118/2 # From the table 4.12 given in the book
shi = 30 # From the table 4.12 given in the book
alpha = degrees(atan(((2*(D/4)/(D)))*tan(shi*pi/180))/sin(Beta*pi/180))
t1 = (f/2)*sin(Beta*pi/180)
w = (D/2)/sin(Beta*pi/180)
lamda = degrees(atan(mu))
phi = 45+alpha-lamda
t1 = f/2
Fc = w*t1*T_S*(cos((lamda-alpha)*pi/180))/((sin(phi*pi/180))*(cos((phi+lamda-alpha)*pi/180)))
Ft = w*t1*T_S*(sin((lamda-alpha)*pi/180))/((sin(phi*pi/180))*(cos((phi+lamda-alpha)*pi/180)))
M = .6*Fc*D/1000
F = 5*Ft*sin(Beta*pi/180)
print "The drilling torque = %0.2f N-m, \nThrust force = %d N."%(M,F)
# Answer in the book for drilling torque is given as 18.2 N-m, and for thrust force is given as 1500 N
from math import asin
# Given that
w = 20 # Width of the mild steel block in mm
Z = 20 # No of teeth in milling cutter
D = 50 # Diameter of the milling cutter in mm
alpha = 10 # Radial rake angle in Degree
f = 15 # Feed velocity of the table in mm/min
N =60 # Rpm of the cutter
t = 1 # Depth of cut in mm
mu = 0.5 # Cofficient of friction
T_s = 400 # Shear yield stress in N/mm**2
t_a = 0.0018 # Avg uncut thickness in mm
Beta = degrees(asin(2*(t/D)))
theta = 2*pi/Z
t1_max = (2*f/(N*Z))*sqrt(t/D)
lamda = degrees(atan(mu))
phi = 45+alpha -lamda
Fc_max = ((w*t1_max*T_s*cos((lamda-alpha)*pi/180)))/((sin(phi*pi/180))*(cos(45*pi/180)))
T_max = Fc_max*D/(2*1000)
M_av = (1/2)*(Beta*T_max)/theta
omega = 2*pi*N/60
U_0 = 1.4 # From the table 4.4 given in the book
Uc_ms = U_0*((t_a)**(-0.4))
R = f*t*w/60
U = Uc_ms * R
print "Power consumption = %0.1f W."%U
# Given that
w = 20 # Width of the mild steel block in mm
Z = 10 # No of teeth in milling cutter
D = 75 # Diameter of the milling cutter in mm
alpha = 10 # Radial rake angle in Degree
f = 100 # Feed velocity of the table in mm/min
N =60 # Rpm of the cutter
t = 5 # Depth of cut in mm
mu = 0.5 # Cofficient of friction
T_s = 400 # Shear yield stress in N/mm**2
t_a = 0.043 # Avg uncut thickness in mm
Beta = degrees(asin(2*(t/D)))
theta = 2*pi/Z
t1_max = (2*f/(N*Z))*sqrt(t/D)
lamda = degrees(atan(mu))
phi = 45+alpha -lamda
Fc_max = ((w*t1_max*T_s*cos((lamda-alpha)*pi/180)))/((sin(phi*pi/180))*(cos(45*pi/180)))
T_max = Fc_max*D/(2*1000)
M_av = (1/2)*(Beta*T_max)/theta
omega = 2*pi*N/60
U_0 = 1.4 # From the table 4.4 given in the book
Uc_ms = U_0*((t_a)**(-0.4))
R = f*t*w/60
U = Uc_ms * R
print "Power required = %d W."%U
# Answer in the book for Power required is given as 817 W
# Given that
B = 20 # Width of the cut in mm
Z = 10 # No of teeth in milling cutter
D = 75 # Diameter of the milling cutter in mm
alpha = 10 # Radial rake angle in Degree
f = 25 # Feed velocity of the table in mm/min
N =60 # Rpm of the cutter
t = 5 # Depth of cut in mm
mu = 0.5 # Cofficient of friction
T_s = 400 # Shear yield stress in N/mm**2
t_a = 0.043 # Avg uncut thickness in mm
t1_max = 0.01
lamda = 0.28 # From the table 4.13 Given in the book
nu = 1400 # From the table 4.13 Given in the book
t1_av = t1_max/2
P = nu*B*t*f*(10**-4)/(6*((t1_av)**(lamda)))
print "Power required = %0.2f W."%P
# Given that
w = 20 # Width of the mild steel block in mm
Z = 10 # No of teeth in milling cutter
D = 75 # Diameter of the milling cutter in mm
alpha = 10 # Radial rake angle in Degree
f = 25 # Feed velocity of the table in mm/min
N =60 # Rpm of the cutter
t = 5 # Depth of cut in mm
mu = 0.5 # Cofficient of friction
T_s = 400 # Shear yield stress in N/mm**2
t_a = 0.043 # Avg uncut thickness in mm
R = f*t*w/60
Uc = 3.3 # Specific energy in J/mm**3 from the table 4.14 Given in the book
U = Uc * R
print "Power required = %d W."%ceil(U)
# Given that
d = 25 # Diameter of circular hole in mm
t = 20 # Thickness of the steel plate in mm
D = 27 # Enlarged diameter of hole in mm
c= 0.08 # Cut per tooth in mm
alpha = 10 # Radial rake angle in Degree
mu = 0.5 # Cofficient of friction
T_s = 400 # Shear yield stress in N/mm**2
lamda=degrees(atan(mu))
phi = 45-lamda+alpha
w = pi*(d+D)/2
Fc = w*c*T_s*(cos((lamda-alpha)*pi/1800)/((sin(phi*pi/180))*(cos(45*pi/180))))
s = 1.75*sqrt(t)
F = 3*Fc
print "Peak broaching load = %d N."%ceil(F)
# Answer in the book is given as 22323 N which is wrong.
# Given that
D = 250 # Diameter of the wheel in mm
N = 2000 # Rpm of the wheel
f =5 # Plung feed rate in mm/min
C = 3 # Surface density of active grain in mm**-2
A = 20*15 # Area of mild steel prismatic bar in mm**2
rg = 15 # In mm**-1
t1 = sqrt(f/(pi*D*N*C*rg))
U_0 = 1.4 # From the table 4.4 given in the book
Uc= U_0*((t1)**(-.4))
R = A*f/60
P = Uc*R
Fc_ = 60000*(P)/(pi*D*A*C*N)
print "Power requirement during plunge grinding of the mild steel primatic bar = %d W."%ceil(P)
# Answer in the book is given as 94 W which is wrong.
# Given that
w = 25 # Width of mild steel block in mm
d= 0.05 # Depth of cut in mm
D = 200 # Diameter of the wheel in mm
N = 3000 # Rpm of the wheel
f =100 # Feed velocity of table in mm/min
C = 3 # No of grits in mm**-2
rg = 15 # In mm**-1
t1_max = sqrt(((6*f)/(pi*D*N*C*rg))*sqrt(d/D))
t1_a = t1_max/2
U_0 = 1.4 # From the table 4.4 given in the book
Uc= U_0*((t1_a)**(-.4))
R = w*d*f/60
P = Uc*R
Fc = 60000*(P)/(pi*D*N)
print "Grinding force = %d N"%Fc
# Given that
d= 0.05 # Depth of cut in mm
f =200 # Feed rate in mm/min
theta = 850 # Surface temperature in °C
Theta = 700 # Maximum surface temperature of workpiece surface required to maintain in °C
K = theta * (f**0.2)/(d**0.9)
r = Theta/K
C = d*f
Dm = (r*C**0.2)**(1/1.1)
fm = C/Dm
print "Required depth of cut = %f mm,\nRequired feed = %d mm/min"%(Dm,fm)
# Given that
shi = 30 # Side cutting edge angle in Degree
lamda = 7 # End cutting edge angle in Degree
r = 0.7 # Nose radius in mm
f = 0.125 # Feed in mm
H_max = f/(tan(shi*pi/180)+1/tan(lamda*pi/180))
H_max_ = (f**2)/(8*r)
print "Maximum height of uneveness in first tool case = %0.3f mm,\nIn second tool case = %0.4f mm"%(H_max,H_max_)
# Given that
Z = 12 # No of teeth
d = 100 # Diameter of cutter in mm
N = 60 # Rpm of cutter
f = 25 # Table feed in mm/min
H_max = (f**2)/(4*d*(N**2)*(Z**2))
print "Maximum height of uneveness = %f mm"%H_max
# Given that
n = 0.25 # Value of exponent of time in Taylor's tool life equation
C = 75 # Value of constant in Taylor's tool life equation
Lc = .15 # Labour cast in $/min
Tc = 2.50 # Total cast of tool in $
t = 2 # Change time for tool in min
x = (C)**(1/n) # Where x = k/(f**(1/n))
v_opt = ((n*x*Lc)/((1-n)*((Lc*t+Tc))))**(n)
print "Cutting speed that will be lead to minimum cast = %0.2f m/min"%v_opt
# Given that
L = 300 # Length of the bar in mm
d=30 # Diameter of the bar in mm
f_max = 0.25 # Maximum allowable feed in mm/revolution
Lc = .25 # Labour and overhead cast in $/min
Tc = 2 # Regrinding cast in $
t = 1 # Change time for tool in min
C_X = 2.50 # Cast of tool of material X per piece in $
C_Y = 3 # Cast of tool of material Y per piece in $
n_x = 0.1 # Value of exponent of time in Taylor's tool life equation for material X
n_y = 0.16 # Value of exponent of time in Taylor's tool life equation for material Y
C_x = 30 # Value of constant in Taylor's tool life equation for material X
C_y = 76 # Value of constant in Taylor's tool life equation For material Y
x_x = (C_x)**(1/n_x) # Where x = k/(f**(1/n))
v_opt_x = ((n_x*x_x*Lc)/((1-n_x)*((Lc*t+Tc))))**(n_x)
Rmin_x = C_X+Lc*t+(Lc*pi*L*d/(1000*f_max*v_opt_x)) + (Lc*t*(pi*L*d/(1000*x_x)))*(v_opt_x**(1/n_y))*(v_opt_x**-1)*(f_max**-1)+(Tc*((pi*L*d/(1000*x_x)))*(v_opt_x**(1/n_x))*(v_opt_x**-1)*(f_max**-1))
x_y = (C_y)**(1/n_y) # Where x = k/(f**(1/n))
v_opt_y = ((n_y*x_y*Lc)/((1-n_y)*((Lc*t+Tc))))**(n_y)
Rmin_y = C_Y+Lc*t+(Lc*pi*L*d/(1000*f_max*v_opt_y)) + (Lc*t*(pi*L*d/(1000*x_y)))*(v_opt_y**(1/n_y))*(v_opt_y**-1)*(f_max**-1)+(Tc*((pi*L*d/(1000*x_y)))*(v_opt_y**(1/n_y))*(v_opt_y**-1)*(f_max**-1))
print "The minimum cost per piece\n When material X is used = %0.2f $,\n When material Y is used = %0.2f $"%(Rmin_x,Rmin_y)
print "So material Y will be suitable for tool as it has low cast"
# Given that
n = 0.25 # Value of exponent of time in Taylor's tool life equation
C = 75 # Value of constant in Taylor's tool life equation
Lc = .15 # Labour cast in $/min
Tc = 2.50 # Total cast of tool in $
t = 2 # Change time for tool in min
x = (C)**(1/n) # Where x = k/(f**(1/n))
v_opt = ((n*x)/((1-n)*t))**(n)
print "Optimum cutting speed for maximum production rate for the job = %0.2f m/min"%(v_opt)