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
|
{
"metadata": {
"name": "",
"signature": "sha256:b3d39c917cf6a960ba7edac2c3153505a96c95d76c51386c4b445bdbf3a8a712"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 2 : Temperature"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.1 Page No : 35"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables\n",
"d = 1\n",
"l = 1; \t\t\t# Assuming\n",
"\n",
"# Calculation\n",
"A_ACDB = (math.pi/4)*(1./3)*((1.05*d)**2)*10.5*l - (math.pi/4)*(1./3)*d**2*10*l ; \t\t\t# Area of ABCD\n",
"A_AEFB = (math.pi/4)*(1./3)*((1.1*d)**2)*11*l - (math.pi/4)*(1./3)*d**2*10*l;\n",
"t = 100*(A_ACDB/A_AEFB);\n",
"\n",
"# Results\n",
"print \"The straight bore thermometer reading would e %.1f degree Celcius\"%t\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The straight bore thermometer reading would e 47.6 degree Celcius\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.2 Page No : 37"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from hornerc import horner\n",
"\n",
"# Calculation\n",
"#e0 = horner(e, 0.); \t\t\t# e.m.f. at t = 0 degree\n",
"e100 = horner([0,0.2,-5e-04], 100.); \t\t\t# e.m.f. at t = 100 degree\n",
"e50 = horner([0,0.2,-5e-04],50); \t\t\t# e.m.f. at t = 50 degreer\n",
"r = (100./e100)*e50; \t\t\t# Reading of thermocouple at t = 50degree\n",
"\n",
"# Results\n",
"print \"Reading of thermocouple at t = 50 degree is %.2f degree Celcius \"%r\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Reading of thermocouple at t = 50 degree is 58.33 degree Celcius \n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.3 Page No : 37"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"R0 = 2.8; \t\t\t# Resistence at t=0 degree in ohm\n",
"R100 = 3.8; \t\t\t# Resistence at t = 100 degree in ohm\n",
"\n",
"# Calculation\n",
"a = (R100/R0 - 1)*0.01; \t\t\t# alpha\n",
"R = 5.8; \t\t\t# Indicated ressistace in ohm\n",
"t = (R/R0 - 1)/a; \t\t\t# Temperature in degree\n",
"\n",
"# Results\n",
"print \"The temperature when indicated resismath.tance is 5.8 ohm is \",t,\"degree\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The temperature when indicated resismath.tance is 5.8 ohm is 300.0 degree\n"
]
}
],
"prompt_number": 3
}
],
"metadata": {}
}
]
}
|