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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
{
"metadata": {
"name": "Chapter_1"
},
"nbformat": 2,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"source": [
"<h1>Chapter 1: Temperature<h1>"
]
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.1, Page Number: 53<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''Temperature Conversion'''",
"",
"#variable declaration",
"c=-40.0 #Temp in degree Celcius",
"",
"#calculations",
"k=c+273",
"F=((9.0/5.0)*c)+32.0",
"R=((9.0/5.0)*c)+492.0",
"",
"#Result",
"print('\\nK=%d\u00b0K' %k)",
"print('\\nF=%d\u00b0F' %F)",
"print('\\nR=%d\u00b0R' %R)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"",
"K=233\u00b0K",
"",
"F=-40\u00b0F",
"",
"R=420\u00b0R"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"source": [
"<h3> Example 1.2, Page Number: 53<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''percentage Accuracy and Error'''",
"",
"#varable Declaration",
"span=1000.0 #given value of span in \u00b0C",
"accuracy=1.0/100.0 #1% accuracy",
"",
"#calculations",
"err=span*accuracy",
"max_scale=1200.0",
"Range_instr=max_scale+span",
"meter_reading=700.0",
"per_of_err=(err/meter_reading)*100.0",
"",
"#result",
"print('(a)\\nAs error can be either positive or negative') ",
"print('\\n the probable error at any point on the scale =\u00b1 %d\u00b0C'%err)",
"print('\\n(b)\\nRange of the Instrument = %d\u00b0C'%Range_instr)",
"print('\\n(c)\\nPercentage of Error = \u00b1 %.2f%% '%per_of_err)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)",
"As error can be either positive or negative",
"",
" the probable error at any point on the scale =\u00b1 10\u00b0C",
"",
"(b)",
"Range of the Instrument = 2200\u00b0C",
"",
"(c)",
"Percentage of Error = \u00b1 1.43% "
]
}
],
"prompt_number": 10
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.3, Page Number: 54<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''Two wire RTD'''",
"",
"#variable declaration",
"resi_per_leg=5.0 # lead wire resistance per leg in Ohm",
"temp_coeff=0.385 # Temperature coefficient of Pt 100 RTD in ohms/\u00b0C",
"",
"#calculation",
"R_due_to_leadwires=2*resi_per_leg",
"err=R_due_to_leadwires/temp_coeff",
"err =round(err,0)",
"temp_obj=200.0",
"temp_measured=temp_obj+err",
"per_of_err=((temp_measured-temp_obj)/temp_obj)*100.0",
"",
"#Result",
"print('(a)\\nThe contribution of 10 ohms lead wire resistance')",
"print('to the measurement error = %d\u00b0C' %err)",
"print('\\n(b)\\nPercentage of Error = %d%%' %per_of_err)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)",
"The contribution of 10 ohms lead wire resistance",
"to the measurement error = 26\u00b0C",
"",
"(b)",
"Percentage of Error = 13%"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.4, Page Number: 54<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''Thermocouple temperature measurement'''",
"",
"#variable declaration",
"temp=2.022 #Millivolt corresponds to reference junction temp 50\u00b0C",
"millivolt_cor=37.325 #Millivolt corresponds to reference junction temp 900\u00b0C",
"",
"#calculation",
"op=millivolt_cor-temp",
"",
"#result",
"print('Millivolt output available = % .3f' %op)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Millivolt output available = 35.303"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.5, Page Number: 54<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''Hot junction temperature of thermocouple'''",
"",
"#variable declaration",
"millivolt_cor=2.585 #Millivolt corresponds to reference junction temp 50\u00b0C",
"pot_reading=30.511 #reading on pot",
"",
"#calculation",
"corrected_millivolt=pot_reading+millivolt_cor",
"",
"#result",
"print('Temperature correspond to %.3f mV from the table = 600\u00b0C' %corrected_millivolt)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Temperature correspond to 33.096 mV from the table = 600\u00b0C"
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.6, Page Number: 54<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''Caliberation of an instrument'''",
"",
"#variable Declarion",
"ref_jun=100.0 #reference junction temp.",
"mV_100=0.645 #voltage at 100\u00b0C",
"mV_1000=9.585 #voltage at 1000\u00b0C",
"mV_1200=11.947 #voltage at 1200\u00b0C",
"",
"#calculation",
"op1=mV_1000-mV_100",
"op2=mV_1200-mV_100",
"",
"#result",
"print('Millivolt to be fed checking 1000 C = %.3f mV'%op1)",
"print('\\nMillivolt to be fed checking 1200 C = %.3f mV'%op2)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Millivolt to be fed checking 1000 C = 8.940 mV",
"",
"Millivolt to be fed checking 1200 C = 11.302 mV"
]
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.7, page Number: 55<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''Wall temperature measurement'''",
"",
"#variable declaration",
"E_rec_pyro=0.95*0.85 #Energy received by pyrometer",
"",
"#calculation",
"T=1100.0/E_rec_pyro",
" ",
"#result",
"print('Pyrometer reading T = %.2f\u00b0C'%T)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Pyrometer reading T = 1362.23\u00b0C"
]
}
],
"prompt_number": 7
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.8, Page Number: 55<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''Thermocouple output'''",
"",
"#(a)",
"",
"#variable declaration",
"hot1_mV=41.29 # Millivolt corresponds to hot junction temp ",
"cold1_mV=2.022 # Millivolt corresponds to cold junction temp ",
"",
"#calculation",
"op1=hot1_mV-cold1_mV",
"",
"#(b)",
"",
"#variable declaration",
"hot2_mV=33.096 #Millivolt corresponds to hot junction temp ",
"cold2_mV=2.585 #Millivolt corresponds to cold junction temp ",
"#calculation",
"op2=hot2_mV-cold2_mV",
"",
"#(c)",
"",
"#variable declaration",
"hot3_mV=11.947 #Millivolt corresponds to hot junction temp ",
"cold3_mV=0.299 #Millivolt corresponds to cold junction temp ",
"#calculation",
"op3=hot3_mV-cold3_mV",
"",
"#result",
"print('(a)\\nOutput Millivolt = %.3f'%op1)",
"print('\\n(b)\\nOutput Millivolt = %.3f'%op2)",
"print('\\n(c)\\nAs the wrongly formed thermocouples at J1 and J2 will always oppose')",
"print('the main millivolt output, the net output will be lower than normal value.')",
"print('Output mV<%.3f'%op3)"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)",
"Output Millivolt = 39.268",
"",
"(b)",
"Output Millivolt = 30.511",
"",
"(c)",
"As the wrongly formed thermocouples at J1 and J2 will always oppose",
"the main millivolt output, the net output will be lower than normal value.",
"Output mV<11.648"
]
}
],
"prompt_number": 8
},
{
"cell_type": "markdown",
"source": [
"<h3>Example 1.9, Page Number: 56<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"'''electtronic temperature transmitter'''",
"",
"#variable declaration",
"Rl_ind=250.0 #load resistor for indicator",
"Rl_rec=250.0 #load resistor for recorder",
"load_allowable=600.0 #allowable load with load independency",
"",
"#calculation",
"load_connected= Rl_ind+Rl_rec",
"max_load_controller=load_allowable-load_connected",
"op_cont=600.0",
"total=Rl_ind+Rl_rec+load_allowable",
"extra_load=total-op_cont",
"",
"#result",
"print('(a)\\nThe max load to the controller = %d ohms'%max_load_controller)",
"print('\\n(b)\\nExtra Load = %d ohms'%extra_load)",
"print('\\nAdditional Power Supply voltage required = 10 V')",
"print('\\nMinimum Power Supply Voltage = 34 ')"
],
"language": "python",
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)",
"The max load to the controller = 100 ohms",
"",
"(b)",
"Extra Load = 500 ohms",
"",
"Additional Power Supply voltage required = 10 V",
"",
"Minimum Power Supply Voltage = 34 "
]
}
],
"prompt_number": 9
}
]
}
]
}
|