summaryrefslogtreecommitdiff
path: root/sample_notebooks/nemichand /Chapter1_1.ipynb
blob: 43f5bce48a081ff9725cde5409a2cdf2323bb00e (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:60b1203d60983bbbb28528cd720bc31b7ac71ec9fc83b7d2e5e78e90b9f2b472"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter1-Introduction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg32"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math\n",
      "\n",
      "#calculate the steady state\n",
      "\n",
      "\n",
      "##The thickness of the slab(L) is 80mm or .08m\n",
      "##The thermal conductivity(k)of the material is .20 W/(m*K)\n",
      "T1=40.;\n",
      "T2=20.;\n",
      "L=.08;\n",
      "k=.20;\n",
      "##The steady state heat transfer rate per unit area through the thick slab is given by q=k(T1-T2)/L\n",
      "print(\"The steady state heat transfer rate per unit area through the thick slab is given by q=k(T1-T2)/L in W/m^2 \")\n",
      "q=k*(T1-T2)/L\n",
      "print(q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The steady state heat transfer rate per unit area through the thick slab is given by q=k(T1-T2)/L in W/m^2 \n",
        "50.0\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg32"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math\n",
      "#calculate the thickness of masonry wall\n",
      "print(\"Introduction to heat transfer by S.K.Som, Chapter 1, Example 2\")\n",
      "##The thermal conductivity(km)of masonry wall is .8 W/(mK)\n",
      "##The thermal conductivity(kc)of composite wall is .2 W/(mK)\n",
      "##The thickness of composite wall(Lc) is 100 mm or .1 m\n",
      "km=.8;\n",
      "kc=.2;\n",
      "Lc=.1;\n",
      "##The thickness of masonry wall(Lm) is to be found. \n",
      "##The steady state heat flow(qm)through masonry wall is km(T1-T2)/L\n",
      "## The steady state heat flow(qc)through composite wall is kc(T1-T2)/L\n",
      "##As the steady rate of heat flow through masonry wall is 80% that through composite wall and both the wall have same surface area and same temp. difference so qm/qc=0.8=(km/kc)*(Lc/Lm)\n",
      "##The thickness of masonry wall is Lm.\n",
      "print (\"The thickness of masonry wall is Lm in m\")\n",
      "Lm=(km/kc)*(Lc/(0.8))\n",
      "print(Lm)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Introduction to heat transfer by S.K.Som, Chapter 1, Example 2\n",
        "The thickness of masonry wall is Lm in m\n",
        "0.5\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "## printlay warning for floating point exception\n",
      "print(\"Introduction to heat transfer by S.K.Som Chapter 1 Example 4\")\n",
      "hbr=200.;\n",
      "Tinf=100.;\n",
      "Ts=20.;\n",
      "##The rate of heat transfer per unit area is q\n",
      "print (\"The rate of heat transfer per unit area q=hbr*(Tinf-Ts) in W/m^2\")\n",
      "q=hbr*(Tinf-Ts)\n",
      "print(q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Introduction to heat transfer by S.K.Som Chapter 1 Example 4\n",
        "The rate of heat transfer per unit area q=hbr*(Tinf-Ts) in W/m^2\n",
        "16000.0\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math\n",
      "#calculat e surface area\n",
      "print(\"Introduction to heat transfer by S.K.Som, Chapter 1, Example 5\")\n",
      "\n",
      "hbr=800.;\n",
      "deltaT=(75.-25.);\n",
      "Q=20.;\n",
      "print(\"The heat exchanger surface area(A)in m^2 required for 20 MJ/h of heating is \")\n",
      "A = (Q*10**6.)/(3600.*hbr*deltaT)\n",
      "print round(A,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Introduction to heat transfer by S.K.Som, Chapter 1, Example 5\n",
        "The heat exchanger surface area(A)in m^2 required for 20 MJ/h of heating is \n",
        "0.14\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##The ambient temprature (Tinf) \n",
      "print(\"Introduction to heat transfer by S.K.Som, Chapter 1, Example 6\")\n",
      "Ts=225.;\n",
      "Tinf=25.;\n",
      "## |because it is modulus function and it converts negative values to positive value.\n",
      "X=0.02;\n",
      "A=.1;\n",
      "m=4;\n",
      "cp=2.8;\n",
      "hbr=(m*cp*10**3*X)/(A*(Ts-Tinf))\n",
      "print round(hbr,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Introduction to heat transfer by S.K.Som, Chapter 1, Example 6\n",
        "11.2\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}