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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 12: Convection Heat Transfer1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exa 12.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat transfer rate from both sides of the plate (Btu/hr) = 40.50\n",
"press enter key to exit\n"
]
},
{
"data": {
"text/plain": [
"''"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#An electrically heated vertical plate, 5 in square has a temperature of \n",
"#150 F and is being cooled by natural convection in 50 F air. What is the \n",
"#heat transfer rate from both sides of the plate?\n",
"import math\n",
"#initialisation of variables\n",
"d= 5. \t\t\t\t\t\t\t\t#ft\n",
"Tw= 150. \t\t\t\t\t\t\t#F\n",
"T= 50 \t\t\t\t\t\t\t\t#F\n",
"Pr= 0.72\n",
"k= 0.015 \t\t\t\t\t\t\t#Btu/hr ft F\n",
"r= 1.76*1000000. \t\t\t\t\t#(F ft^3)^-1\n",
"#CALCULATIONS\n",
"D= d*(0.42/5.) \t\t\t\t\t\t#Diameter\n",
"dt= Tw-T \t\t\t\t\t\t\t#change in temp\n",
"Gr= r*D*D*D*dt \t\t\t\t\t\t#Grashof number\n",
"z= Gr*Pr \t\t\t\t\n",
"h= 0.59*(math.pow(z,(0.25))) *(k/D) #Heat transfer coefficient\n",
"q= (2*h*dt*d*d)/144. \t\t\t\t#Heat transfer rate\n",
"#RESULTS\n",
"print '%s %.2f' % ('Heat transfer rate from both sides of the plate (Btu/hr) = ',q)\n",
"raw_input('press enter key to exit')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exa 12.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat transfer coefficient when the flow is fully devoloped (Btu/hr ft^2 F) = 1311.13\n",
"press enter key to exit\n"
]
},
{
"data": {
"text/plain": [
"''"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Cooling water at an average temperature of 70 F flows through a tube of \n",
"#0.9 in ID, with an average velocity of 7 ft/s. What is the heat transfer\n",
"#coefficient when the flow is fully developed?\n",
"#initialisation of variables\n",
"import math\n",
"T= 70. \t\t\t\t\t\t\t\t\t\t#F\n",
"l= 0.9 \t\t\t\t\t\t\t\t\t\t#in\n",
"v= 7. \t\t\t\t\t\t\t\t\t\t#ft/s\n",
"d= 62.3 \t\t\t\t\t\t\t\t\t#lbm/ft^3\n",
"m= 6.58*math.pow(10,-4) \t\t\t\t\t#lbm/ft s\n",
"Pr= 6.82 \n",
"k= 0.347 \t\t\t\t\t\t\t\t\t#Bt/hr ft F\n",
"#CALCULATIONS\n",
"l1= l*0.075/l\n",
"Re= (d*v*l1)/m \t\t\t\t\t\t\t\t#Reynold's number\n",
"Nu= 0.023*math.pow(Re,0.8)*math.pow(Pr,0.4) #Nusselt number\n",
"h= Nu*k/l1 \t\t\t\t\t\t\t\t\t#Transfer coefficient\n",
"#RESULTS\n",
"print '%s %.2f' % ('Heat transfer coefficient when the flow is fully devoloped (Btu/hr ft^2 F) = ',h)\n",
"raw_input('press enter key to exit')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exa 12.3"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat transfer rate per unit lenght (W/m) = 23.21\n",
"press enter key to exit\n"
]
},
{
"data": {
"text/plain": [
"''"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Air at 1 atm pressure and a mixing cup temperature of 450k flows through \n",
"#a 3 cm diameter tube with a velocity of 6 m/s. determine the heat transfer\n",
"#rate per unit length if tube if a constant heat flux condition is maintained\n",
"#at the tube wall and the wall temperature is 10 C above the air temperature\n",
"import math\n",
"#initialisation of variables\n",
"P= 1 \t\t\t\t\t\t\t\t\t\t#atm\n",
"d= 0.783 \t\t\t\t\t\t\t\t\t#Kg/m^3\n",
"K= 0.0371 \t\t\t\t\t\t\t\t\t#W/m C\n",
"m= 2.48*math.pow(10,-5) \t\t\t\t\t#Ns/m^2\n",
"Pr= 0.683\n",
"D= 0.03 \t\t\t\t\t\t\t\t\t#m\n",
"v= 6 \t\t\t\t\t\t\t\t\t\t#m/s\n",
"T= 10 \t\t\t\t\t\t\t\t\t\t#C\n",
"#CALCULATIONS\n",
"Re= d*v*D/m \t\t\t\t\t\t\t\t#Reynolds number\n",
"Nu= 0.023*math.pow(Re,0.8)*math.pow(Pr,0.4) #Nusselt number\n",
"h= Nu*K/D \t\t\t\t\t\t\t\t\t#Heat transfer coefficient\n",
"ql= h*math.pi*D*T \t\t\t\t\t\t\t#Heat transfer rate\n",
"#RESULTS\n",
"print '%s %.2f' % ('Heat transfer rate per unit lenght (W/m) = ',ql)\n",
"raw_input('press enter key to exit')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exa 12.4"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat transfer rate per unit lenght of cylinder (W/m) = 3023.70\n",
"press enter key to exit\n"
]
},
{
"data": {
"text/plain": [
"''"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Air at 1 atm pressure and 25 C flows past a horizontal 5 cm diameter with\n",
"#a velocity of 46 m/s. If the surface of the cylinder is kept at 135 C, determine\n",
"#the rate of heat flow from the cylinder\n",
"import math\n",
"#initialisation of variables\n",
"T= 25 \t\t\t\t\t\t#C\n",
"P= 1 \t\t\t\t\t\t#atm\n",
"v= 46 \t\t\t\t\t\t#m/s\n",
"d= 5 \t\t\t\t\t\t#cm\n",
"T1= 135 \t\t\t\t\t#C\n",
"d1= 0.998 \t\t\t\t\t#kg/m^3\n",
"k= 0.03 \t\t\t\t\t#W/m C\n",
"m= 2.08*math.pow(10,-5) \t#Kg/s m\n",
"c= 0.024\n",
"n= 0.81\n",
"#CALCULATIONS\n",
"Tf= (T+T1)/2. \t\t\t\t#Final temp.\n",
"D= d/100.\n",
"Re= d1*v*D/m \t\t\t\t#Reynolds number\n",
"h= c*math.pow(Re,0.81)*k/D \t#Heat transfer coefficient\n",
"dt= T1-T \t\t\t\t\t#temp diff.\n",
"ql= h*math.pi*D*dt \t\t\t#Heat transfer rate\n",
"#RESULTS\n",
"print '%s %.2f' % ('Heat transfer rate per unit lenght of cylinder (W/m) = ',ql)\n",
"raw_input('press enter key to exit')"
]
}
],
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|