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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 08 : Diffusion in Solids"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.1, Page No 180"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"t = 5.0 # thickness in mm\n",
"c = 10.0 # concentration\n",
"D = 1e-9 # diffusion coefficient\n",
"\n",
"#Calculations\n",
"j = D*c/(t*1e-3)\n",
"\n",
"#Results\n",
"print(\"Outward flux is %.0e kg m^-2 s^-1\" %j)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Outward flux is 2e-06 kg m^-2 s^-1\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.2, Page No 186"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"D_0 = 0.24e-4 \t# diffusion coefficient\n",
"Q = 121e3\n",
"R = 8.314\t# Universal gas constant\n",
"T = 550 \t# temperature in Celsius\n",
"k = 0.2 \t# thickness of pure Al sheet in mm\n",
"d = 0.1 \t# penetration depth in mm\n",
"c_x = 0.4 \t# concentration in percentage\n",
"A = 2.0 \t# Constant in percentage\n",
"B = 2.0\t\t# Constant in percentage\n",
"\n",
"#Calculations\n",
"x = d-k\n",
"D_cu_al = D_0*math.exp(-Q/(R*(T+273))) \n",
"k = (A-c_x)/B\n",
"if k ==0.8 :\n",
" z = 0.9 # from table\n",
"\n",
"t = (x*1e-3)**2/(z**2*4*D_cu_al)\t# time in sec\n",
"\n",
"#Results\n",
"print(\"Material can be kept at %d degree Celsius for nearly %d minute\" %(T,(t/60)))\t# answer in book is 100 min\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Material can be kept at 550 degree Celsius for nearly 102 minute\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.3, Page No 188"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"D_0 = 0.7e-4 \t # diffusion coefficient\n",
"Q = 157.0\t\t # Energy in kJ mol^-1, considered from table 8.2\n",
"R = 8.314\t\t # Universal gas constant\n",
"T = 950.0\t\t # temperature in Celsius\n",
"c2 = 0.8 \t\t # concentration in percentage\n",
"cs = 0 \t\t\t # concentration in percentage\n",
"c_x = 0.6 # concentration in percentage\n",
"t = 4.0 # time in hours\n",
"a = 1.0 #let\n",
"\n",
"#Calculations\n",
"A = cs\n",
"B = c2-cs \n",
"D = D_0*math.exp(-Q*1e3/(R*(T+273)))\n",
"k = math.erf(((A-c_x)/B))*-1\n",
"if k >0.7 :\n",
" if k<0.712 :\n",
" z = 0.81 # from table\n",
"\n",
"x = z*2*math.sqrt(D*t*3600.0)\n",
"\n",
"#Results\n",
"print(\"Depth up to which machining is required is nearly %.2f mm\" %(x*1e3))\n",
"\n",
"# numerical value of answer in book is 0.75\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Depth up to which machining is required is nearly 0.72 mm\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.4 Page No 189"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"D = 4e-17 \t\t# diffusion coefficient\n",
"c1 = 0\n",
"cs = 3e26\n",
"c_x = 1e23 \t\t# number of atoms\n",
"x = 2e-6 \t\t# depth in m\n",
"\n",
"#Calculations\n",
"A = cs\n",
"B = cs - c1\n",
"k = (A-c_x)/B\n",
"if k >0.99966 :\n",
" if k< 0.9997 :\n",
" z = 2.55 # from table\n",
"\n",
"t = x**2/(z**2*4*D) # time in sec\n",
"\n",
"#Results\n",
"print(\"Time required to get required boron concentration is %d sec\" %t) # answer in book is 3845 sec\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Time required to get required boron concentration is 3844 sec\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.5, Page No 194"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"r = 10.0 # radius in mm\n",
"t = 4.0 # thickness in angstrom\n",
"\n",
"#Calculations\n",
"r = 2*math.pi*r*1e-3*t*1e-10/(math.pi*(r*1e-3)**2)\n",
"\n",
"#Results\n",
"print(\"Ratio of cross sectional areas is %.0e \" %r)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Ratio of cross sectional areas is 8e-08 \n"
]
}
],
"prompt_number": 15
}
],
"metadata": {}
}
]
}
|