In [3]:

```
v1 = 18 # cutting speed in m/min
t1 = 3 # tool life in hours
n = 0.125 # exponent
c = v1*(t1*60)**n # constant
v2 = 24 # cutting speed in m/min
t = (c/v2)**(1/0.125) # tool life in min.
print "Tool life = %d min."%(t)
```

In [4]:

```
from __future__ import division
c_t = 8 # tool change time in min.
r_t = 5 # tool re-grind time in min.
mr_c = 5 # machine running cost per hour
d = 30 # total depreciation per re-grind in paisa
n = 0.25 # exponent
c = 150 # constant
c_c = mr_c*c_t/60 # total change cost in Rs
r_c = mr_c*r_t/60 # regrind cost in Rs
ct = c_c+r_c+d/100 # tooling cost in Rs
cm = mr_c/60 # machining cost in Rs
v = c*((cm*n)/(ct*(1-n)))**n # cutting speed in m/min.
print "Cutting speed = %0.1f m/min."%(v)
```

In [5]:

```
from math import pi, tan, atan, cos, sin
mu1 = 0.15 # coefficient of friction
mu2 = 0.18 # coefficient of fricton
alpha = 14 # angle of contact in degree
alpha = alpha*pi/180
bita = 10 # semi-cone angle in degree
bita = bita*pi/180
sigma_0 = 1.40 # kN/mm**2
h0 = 1.5 #mm
h1 = 1 # mm
B = (mu1+mu2)/(tan(alpha)+tan(bita))
sigmad = (sigma_0*(1+B)*(1-(h1/h0)**B))/B # drawing stress in kN/mm**2
d1 = 11 # outside diameter in mm
t = 1 # thickness in mm
d2 = d1-t # mm
a = (pi*((d1)**2-(d2)**2))/4 # area in mm**2
l = sigmad*a # load in kN
s = 0.65 # drawing speed in m/s
w = l*s # work in kJ/s
p = w # power in kW
print "Drawing load = %0.3f kN\nPower rating of motor = %0.2f kW"%(l , p)
t = 0.127 # uncut chip thickness in mm
b = 6.35 # width of cut in mm
v = 2 # cutting speed in m/s
alpha = 10 # rake angle in degrees
fc = 567 # cutting force in N
ft = 227 # thrust force in N
tc = 0.228 # chip thickness in mm
r = t/tc # chip thickness ratio
alpha = alpha*pi/180 # rake angle in radians
phi = atan(r*cos(alpha)/(1-(r*sin(alpha)))) # shear angle
phi1 = phi*180/pi # shear angle
print "Shear angle = %0.2f degree"%(phi1)
mu =((fc*sin(alpha)+ft*cos(alpha))/(fc*cos(alpha)-ft*sin(alpha))) #coefficient of friction
bita = atan(mu) # friction angle
bita = bita*180/(pi)
print "Friction angle = %0.2f degree"%(bita )
fs = fc*cos(phi)-ft*sin(phi) #shear force in N
taus = (fs*sin(phi))/(b*t) # shear stress
print "Shear stress = %0.1f N/mm**2"%(taus)
cp = fc*v/1000 # cutting power in kw
print "Cutting power = %0.3f kw "%(cp)
vc = v*r # chip velocity in m/s
print "Chip velocity = %0.3f m/s"%(vc)
ss = 1/tan(phi) + tan(phi-alpha) # shear strain
print "shear strain = %0.3f"%(ss)
spl = t/sin(phi) # shear plane length
vs = v*cos(alpha)/cos(phi-alpha) # shear velocity
S = vs*10/spl # shear strain rate
S = S*10**3 # shear strain rate
print "Shear strain rate = %.3f s**-1"%(S)
# 'Answers vary due to round off error'
```

In [6]:

```
v = 30 # cutting speed in m/min
feed = 0.3 # feed rate in mm/rev.
d = 2.5 # depth of cut in mm
t = 60 # tool life in min.
c = v*t**0.13*feed**0.77*d**0.37 # constant
print "constant = %0.2f "%(c)
v2 = v*1.2 # cutting speed in m/min
t2 = (c/(v2*feed**0.77*d**0.37)) # tool life when cutting speed increased by 20% in min.
t2 = t2**(1/0.13)
f2 = feed*1.2 # feed rate in mm/rev.
t3 = (c/(v*d**0.37*f2**0.77)) # tool life when feed rate increased by 20% in min.
t3 = t3**(1/0.13)
d2 = d*1.2 # depth of cut in mm
t4 = (c/(v*feed**0.77*d2**0.37)) # tool life when depth of cut increased by 20% in min.
t4 = t4**(1/0.13)
t5 = (c/(v2*d2**0.37*f2**0.77)) # tool lfe in min.
t5 = t5**(1/0.13)
print "Tool life when cutting speed increased by 20 = %0.2f min."%(t2)
print "Tool life when feed rate increased by 20 = %0.2f min."%(t3)
print "Tool life when depth of cut increased by 20 = %0.2f min."%(t4)
print "Tool life when all taken together after increasing by 20 = %0.2f min."%(t5)
# 'Answers vary due to round off error'
```

In [7]:

```
from math import atan, cos, sin, pi
t = 0.25 # uncut chip thickness in mm
b = 2.5 # width of cut in mm
v = 2.5 # cutting speed in m/s
alpha = 10 # rake angle in degrees
fc = 1130 # cutting force in N
ft = 295 # thrust force in N
tc = 0.45 # chip thickness in mm
r = t/tc # chip thickness ratio
alpha = alpha*pi/180 # rake angle in radians
phi = atan((r*cos(alpha))/(1-r*sin(alpha))) # shear angle
phi2 = phi*180/pi # shear angle
fs = fc*cos(phi) - ft*sin(phi) #shear force in N
print "Force of shear at shear plane = %0.2f N"%(fs)
mu = atan((fc*sin(alpha)+ft*cos(alpha))/(fc*cos(alpha)-ft*sin(alpha))) #friction anglele
print "Friction angle = %0.3f degree"%(mu )
# 'Answers vary due to round off error'
```

In [8]:

```
from math import cos, atan, pi, tan
t = 0.2 # uncut chip thickness in mm
alpha = 15 # rake angle in degrees
tc = 0.62 # chip thickness in mm
r = t/tc # chip thickness ratio
crc = 1/r # chip reduction coefficient
print "Cutting ratio = %0.3f\nChip reduction co-efficient = %0.1f"%(r , crc)
alpha = alpha*pi/180 # rake angle in radians
phi = atan(r*cos(alpha)/(1-r*sin(alpha))) # shear angle
phi = phi*180/pi # shear angle
print "Shear angle = %0.2f degree"%(phi)
ss = 1/tan(phi*pi/180) + tan((phi*pi)/180-(alpha*pi)/180) # shear strain
print "shear strain = %0.3f"%(ss)
# 'Answers vary due to round off error'
```

In [9]:

```
from math import log
v1 = 25 # cutting speed in m/min
t1 = 90 # tool life in min.
v2 = 35 # cutting speed in m/min
t2 = 20 # tool life in min
n = log(v2/v1)/log(t1/t2) # exponent
C = v1*(t1)**n # constant
t = 60 # tool life in min.
v = C/(t)**n # cutting speed in m/min.
print " n = %0.3f\n C = %0.1f\n Cutting speed = %0.2f m/min."%(n , C,v)
# 'Answers vary due to round off error'
```

In [10]:

```
from math import ceil, cos, sin, atan, tan
t = 0.5 # uncut chip thickness in mm
b = 3 # width of cut in mm
alpha = 15 # rake angle in degrees
alpha = alpha*pi/180 # rake angle in radians
r = 0.383 # chip thickness ratio
mu = 0.7 # average coefficient of friction on tool face
bita = atan(mu) # friction angle
tau = 280 # yield stress in N/mm**2
phi = atan((r*cos(alpha))/(1-r*sin(alpha))) # shear angle
fc = (tau*b*t)/(1/cos(bita-alpha)*cos(phi+bita-alpha)*sin(phi)) # cutting force in N
ft = (fc*(mu-tan(alpha)))/(1+mu*tan(alpha)) # thrust force in N
F = fc*sin(alpha)+ft*cos(alpha) # tangential force on tool face in N
F = ceil(F)
N = fc*cos(alpha)-ft*sin(alpha) # normal force on tool face in N
print " Tangential force on tool face = %d N\n normal force on tool face = %0.1f N"%(F,N)
# 'Answers vary due to round off error'
```

In [11]:

```
from math import sqrt, cos, sin, tan, pi,atan
t = 0.25 # uncut chip thickness in mm
b = 0.5 # width of cut in cm
v = 8.2 # cutting speed in m/min.
alpha = 20 # rake angle in degrees
alpha2 = alpha*pi/180 # rake angle in radians
r = 0.351 # cutting ratio
phi = atan(r*cos(alpha2)/(1-r*sin(alpha2))) # shear angle in radians
phi2 = phi*180/pi # shear angle in degrees
alpha2 = alpha*pi/180 # rake angle in radians
bita = 35+alpha-phi2 # degrees
s = 1/tan(phi) + tan(phi-alpha2) # shear strain
e = s/sqrt(3) # natural strain
sigma = 784*(e)**0.15 # tensile property in N/mm**2
tau = sigma/sqrt(3) # yield shear stress in N/mm**2
As = (b*10*t)/sin(phi) # shear plane area in mm**2
Fs = tau*As # shear gorce in N
R = Fs/cos(phi+(bita*pi/180)-alpha2)
Fc = R*cos((bita*pi/180)-alpha2) # cutting force in N
Ft = R*sin((bita*pi/180)-alpha2) # thrust force in N
print " Cutting force= %0.1f N\n Thrust force = %0.1f N"%(Fc , Ft)
# 'Answers vary due to round off error'
```

In [12]:

```
from math import pi, atan, cos, sin, tan
f = 0.2 # feed in mm/rev.
t = 0.2 # uncut chip thickness in mm
alpha = 10 # rake angle in degrees
fc = 1600 # cutting force in N
ft = 850 # thrust force in N
tc = 0.39 # chip thickness in mm
r = t/tc # chip thickness ratio
d = 2 # depth of cut in mm
b = 2 # mm
alpha2 = alpha*pi/180 # rake angle in radians
phi = atan(r*cos(alpha2)/(1-r*sin(alpha2))) # shear angle in radians
phi2 = phi*180/pi # shear angle in degree
fs = fc*cos(phi)-ft*sin(phi) #shear force in N
fn = fc*sin(phi)+ft*cos(phi) # normal force in N
f = fc*sin(alpha2)+ft*cos(alpha2) # friction force in N
mu =((fc*tan(alpha2)+ft)/(fc-ft*tan(alpha2))) #kinetic coefficient of friction
s = fc/(b*t) # specific cutting energy in N/mm**2
print " Shear force = %d N\n Normal force = %0.1f N\n Friction force = %0.1f N\n Kinetic coefficient of friction = %0.3f"%(fs , fn ,f , mu)
print " Specific cutting energy = %d N/mm**2"%(s)
# 'Answers vary due to round off error'
```

In [13]:

```
from math import sqrt, pi, sin, cos
cs = 20 # side cutting edge angle in degree
ce = 30 # end cutting edge angle in degree
f = 0.1 # feed in mm/rev.
r = 3 # nose radius in mm
cs2 = cs*pi/180 # side cutting edge angle in radians
ce2 = ce*pi/180 # end cutting edge angle in radians
h = (1-cos(ce2))*r + f*sin(ce2)*cos(ce2) - sqrt((2*f*r*(sin(ce2))**3)-((f**2)*(sin(ce2))**4))
Ra = h/4 # Centre line average roughness in mm
print "Centre line average roughness = %0.2f*10**-6m"%(Ra*10**3)
# 'Answers vary due to round off error'
```

In [14]:

```
from math import atan, cos, tan, pi, sqrt
i = 0 # inclination angle in degree
alpha = 10 # orthogonal rake angle in degree
lemda = 75 # principal cutting edge angle in degree
alpha = alpha*pi/180 # orthogonal rake angle in radian
lemda = lemda*pi/180 # principal cutting edge angle in radian
alpha_b = atan(cos(lemda)*tan(alpha)+sin(lemda)*tan(i)) #back rake angle in radians
alpha_b = alpha_b*180/pi # back rake angle in degree
alpha_s = atan(sin(lemda)*tan(alpha)-cos(lemda)*tan(i)) # side rake angle in radians
alpha_s = alpha_s*180/pi # side rake angle in degree
print " Back rake angle = %0.2f degree\n Side rake angle = %0.2f degree"%(alpha_b,alpha_s)
```

In [15]:

```
from math import sqrt, pi, atan, sin
alphab = 8 # back rake in degree
alphas = 4 # side rake in degree
cs = 15 # side cutting edge angle in degree
lemda = 90 - cs # approach angle in degree
alphab = alphab*pi/180 # back rake in radian
alphas = alphas*pi/180 # side rake in radian
cs = cs*pi/180 # side cutting edge angle in radian
lemda = lemda*pi/180 # approach angle in radian
alpha = atan(tan(alphas)*sin(lemda)+tan(alphab)*cos(lemda)) # orthogonal rake angle in radian
alpha = alpha*180/pi # orthogonal rake angle in degree
i = atan(sin(lemda)*tan(alphab)-cos(lemda)*tan(alphas)) # inclnation angle in radian
i = i*180/pi # inclnation angle in degree
print " Othogonal rake angle = %0.2f degree\n Inclination angle = %0.1f degree"%(alpha , i)
```

In [16]:

```
cs = 15 # side cutting edge angle in degree
v = 0.2 # cutting speed in m/s
f = 0.5 # feed rate in mm/rev.
d = 3.2 # depth of cut in mm
fc = 1593*(f)**0.85*(d)**0.98 # cutting force in N
pc = fc*v/1000 # cutting power in kw
ita_mt = 0.85 # efficiency of lathe
pm = pc/ita_mt # motor power in kw
a = f*d # area of uncut chio in mm**2
r = fc/a # specific cutting resistance in N/mm**2
p = pc/(a*v)# unit power in W/(mm**3)*s
print " Cutting power = %0.3f kw\n Motor power = %0.2f kw\n Specific cutting resistance = %0.2f N/mm**2\n Unit power = %0.3f W/(mm**3)*s"%(pc,pm,r,p)
# 'Answers vary due to round off error'
```

In [17]:

```
C = 400
n=0.5
a=2 # (T1/T2)**n
b=2**(1/n) # T2
i = (b-1)*100 # percentage increase
print "Percentage increase = %d percent"%(i)
```

In [18]:

```
from math import acos, sin, pi, sqrt
t = 0.127 # uncut chip thickness in mm
b = 6.35 # width of cut in mm
v = 1.20 # cutting speed in m/min.
alpha = 10 # rake angle in degrees
fc = 556.25 # cutting force in N
ft = 222.50 # thrust force in N
tc = 0.229 # chip thickness in mm
r = t/tc # chip thickness ratio
R = sqrt((fc**2)+(ft**2))
bita = (acos(fc/R)) + alpha*pi/180 #
f = R*sin(bita) #
fe = f*r # friction energy
p = (f*r*100)/fc # percentage of fricton enrgy and total energy
print "The percentage of total energy that goes into overcoming friction at tool chip interface = %0.2f percent"%(p)
# 'Answers vary due to round off error'
```

In [19]:

```
from math import pi
D = 300 # diameter in mm
r = 45 # rev/min.
d = 2 # depth of cut in mm
f = 0.3 # feed in mm/rev
fc = 1850 # cutting force in N
ff = 450 # feed force in N
V = 2.5*10**6 # metal removed in mm
v = (pi*D*r)/(60*1000) # cutting velocity in m/s
pc = fc*v/1000 # cutting power in kW
fv = f*r/60*1000 # feed velocity in m/s
fp = fv*ff # feed power in W
mrr = d*f*v*60*1000 # mm**3/min.
ce = pc*1000*60/mrr # specific cutting energy in W*s/mm**2
E = ce*V/(3600*1000) # energy consumed
print " Power consumption = %0.2f W\n Specific cutting energy = %0.2f W*s/mm**3\n Energy consumed = %0.3f kWh"%(pc,ce,E)
# 'Answers vary due to round off error'
```

In [20]:

```
from math import atan, degrees, sin, cos, tan
D = 100 # diameter in mm
cs = 30 # side cutting edge angle in degree
lemda = 90 - cs # approach angle in degree
d = 2.5 # depth of cut in mm
f = 0.125 # feed in mm/rev.
N = 300 # turning speed of job in rev./min.
mu = 0.6 # coefficient of friction
tau = 400 # ultimate shear stress in Mpa
bita = degrees(atan(mu)) # friction angle in radian
alphas = 10 # side rake angle
alphab = 6 # back rake angle
alpha = degrees(atan(tan(alphas))*sin(lemda*pi/180)+tan(alphab*pi/180)*cos(lemda*pi/180)) # orthogonal rake angle in degree
phi = 45 - ( bita - alpha) # shear angle
Fc = tau*d*f/(1/cos((bita-alpha)*pi/180)*cos((phi+bita-alpha)*pi/180)*sin(phi*pi/180)) # cutting force in N
Ft = Fc*tan((bita-alpha)*pi/180) # thrust component in N
Ff = Ft*sin(lemda*pi/180) # feed force along axis of job in N
Rf = Ft*cos(lemda*pi/180) # radial force normal to axis of job in N
v = pi*D*N/(1000*60) # velocity in m/s
p = Fc*v # power in watts
print " Cutting force = %d N\n Thrust force = %0.3f N\n Feed force = %0.1f N\n Radial force = %0.3f N\n Cutting power = %d watts"%(Fc,Ft,Ff,Rf,p)
# 'Answers vary due to round off error'
```