summaryrefslogtreecommitdiff
path: root/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_21.ipynb
blob: 1f68c4e7d7743a19f5fa58b73e7f3730c7ed0ce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 21: Machining of Metals"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "### Example 21.1, Mechanics of Machining, Page No. 685"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Shear Plane Angle for 1040 steel= 22.2946 deg\n",
      "\n",
      "Shear Plane Angle for Copper = 10.6433 deg\n"
     ]
    }
   ],
   "source": [
    "from scipy.optimize import fsolve\n",
    "from math import radians, degrees, pi, cos, sin\n",
    "\n",
    "#variable declaration\n",
    "a=6;\n",
    "sigma_s=60000.0;\n",
    "su_s=91000.0;\n",
    "sigma_c=10000.0;\n",
    "su_c=30000;\n",
    "a=radians(a);\n",
    "\n",
    "\n",
    "#calculation\n",
    "def s(fi):\n",
    "    return cos(fi-a)*sin(fi)-sigma_s/su_s*(cos(pi/4-a/2)*sin(pi/4+a/2))\n",
    "def c(fi):\n",
    "    return cos(fi-a)*sin(fi)-sigma_c/su_c*(cos(pi/4-a/2)*sin(pi/4+a/2))\n",
    "fi1=fsolve(s,0);\n",
    "fi2=fsolve(c,0);\n",
    "fi1=degrees(fi1);\n",
    "fi2=degrees(fi2);\n",
    "\n",
    "#result\n",
    "print('\\nShear Plane Angle for 1040 steel= %g deg')%(fi1);\n",
    "print('\\nShear Plane Angle for Copper = %g deg')%(fi2);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Example 21.2, Mechanics of Machining, Page No. 687"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Slip plane angle = 33.1927 deg\n",
      "Percentage of total energy that goes into friction = 30.918 percent\n",
      "Percentage of total energy that goes into shear = 69.082 percent\n",
      "Total energy per unit volume = 0.197285 hp min/in^3\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "from math import sin\n",
    "from math import cos\n",
    "from math import tan\n",
    "from math import atan\n",
    "from math import radians\n",
    "from math import sqrt\n",
    "from math import degrees\n",
    "\n",
    "#variable declaration\n",
    "v=500;\n",
    "alpha=6;\n",
    "b=0.4;\n",
    "t=0.008;\n",
    "Fv=100;\n",
    "Fh=250;\n",
    "L=20;\n",
    "rho=0.283;\n",
    "m=13.36;\n",
    "m=m/454;            #conversion to lb\n",
    "\n",
    "#calculation\n",
    "tc=m/(rho*b*L);\n",
    "r=t/tc;\n",
    "alpha=radians(alpha);\n",
    "fi=atan(r*cos(alpha)/(1-r*sin(alpha)));\n",
    "#fi=degrees(fi);\n",
    "mu=(Fv+Fh*tan(alpha))/(Fh-Fv*tan(alpha));\n",
    "be=atan(mu);\n",
    "Pr=sqrt(Fv**2+Fh**2);\n",
    "Ft=Pr*sin(be);\n",
    "p_fe=Ft*r/Fh;\n",
    "Fs=Fh*cos(fi)-Fv*sin(fi);\n",
    "vs=v*cos(alpha)/cos(fi-alpha);\n",
    "p_se=Fs*vs/(Fh*v);\n",
    "U=Fh*v/(b*t*v);\n",
    "U=U/33000;                     #conversion to hp\n",
    "U=U/12;                         #conversion of ft units to in units\n",
    "fi=degrees(fi);\n",
    "\n",
    "#result\n",
    "print('\\nSlip plane angle = %g deg\\nPercentage of total energy that goes into friction = %g percent\\nPercentage of total energy that goes into shear = %g percent\\nTotal energy per unit volume = %g hp min/in^3')%(fi,p_fe*100,p_se*100,U);\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Example 21.3, Tool Materials and Tool Life, Page No. 698"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "For High Speed steel tool, increase in tool life is given by: t2 = 322.54 t1\n",
      "\n",
      "For Cemented carbide tool, increase in tool life is given by: t2 = 10.0794 t1\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "#variable declaration\n",
    "d=0.5;\n",
    "\n",
    "#calculation\n",
    "t1=(1/d)**(1/0.12);\n",
    "t2=(1/d)**(1/0.3);\n",
    "\n",
    "#result\n",
    "print('\\nFor High Speed steel tool, increase in tool life is given by: t2 = %g t1')%(t1);\n",
    "print('\\nFor Cemented carbide tool, increase in tool life is given by: t2 = %g t1')%(t2);\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Example 21.4, Grinding Processes, Page No. 703"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tangential force = 24 N\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "#variable declaration\n",
    "U=40;\n",
    "uw=0.3;\n",
    "b=1.2;\n",
    "v=30;\n",
    "d=0.05;\n",
    "\n",
    "#calculation\n",
    "b=b*10**-3;                   #conversion to m\n",
    "d=d*10**-3;                     #conversion to m\n",
    "U=U*10**9;                     #conversion to Pa\n",
    "M=uw*b*d;\n",
    "P=U*M;\n",
    "F=P/v;\n",
    "\n",
    "#result\n",
    "print('Tangential force = %g N')%(F);\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}