summaryrefslogtreecommitdiff
path: root/Heat_And_Thermodynamics_by_A._Manna/ch7.ipynb
blob: 05fb5d5460b335c09a353ec97326ff21cb99648d (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
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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 7 : The joule thomson cooling efect"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.1 page no : 239"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "t = 33.18;\t\t\t#critical temperature in K\n",
      "pc = 12.80*76*981*13.6;\t\t\t#critical pressure in dynes/sq.cm\n",
      "r = 83.15;\t\t\t#universal gas constant in kj/kg.K\n",
      "d = 0.08987;\t\t\t#density of hydrogen in gm/lit\n",
      "v = 2000/0.08987;\t\t\t#gram molecular volune of hydrogen in cc\n",
      "\n",
      "# Calculations\n",
      "b = r*10**6*t/(8*pc);\t\t\t#vanderwaal constant in cm**3/mol\n",
      "to = 2*27*t*(1-(b/v))/8;\t\t\t#inversion temperature of the hydrogen in K\n",
      "\n",
      "# Result\n",
      "print 'the inversion temperature of hydrogen is %3.2f K'%(to)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the inversion temperature of hydrogen is 223.70 K\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.2 pageno : 240"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "b = 0.00136;\t\t\t#vanderwaal constant in suv/gm\n",
      "a = 0.011;\t\t\t#vanderwaal constant in atm(suv)**2/gm**2\n",
      "r = 0.003696;\t\t\t#universal gas constant in atm(suv)/gm.deg\n",
      "t = 423;\t\t\t#temperature of steam in K\n",
      "cp = -0.674/0.024205;\t\t\t#specific heat at 423K in atm(cc)gm(deg)\n",
      "\n",
      "# Calculations\n",
      "dt = (-b+(2*a/(r*t)))/cp;\t\t\t#change of temperature per atm drop of pressure in deg/atm\n",
      "\n",
      "# Result\n",
      "print 'the change of temperature per atmosphere drop of pressure is %3.7f deg/atm'%(dt)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the change of temperature per atmosphere drop of pressure is -0.0004565 deg/atm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.3 pageno : 241"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "r = 8.3*10**7;\t\t\t#universal gas constant in ergs/deg.C\n",
      "a = 1.36*10**6*76*13.6*981;\t\t\t#vanderwaal constant in atm.(suv**2)/(gm**2)\n",
      "b = 32;\t\t\t#vanderwaal constant in cc\n",
      "cp = 7.03;\t\t\t#specific heat at constant pressure in cal\n",
      "j = 4.18*10**7;\t\t\t#joules constant in ergs/cal\n",
      "t = 273;\t\t\t#temperature of the gas in K\n",
      "\n",
      "# Calculations\n",
      "dt = ((2*a/(r*t))-b)*10**6/(cp*j);\t\t\t#change of temperature in atmosphere drop of pressure in deg/atm/cm**3\n",
      "\n",
      "# Result\n",
      "print 'the change of temperature in atmosphere drop of pressure is %3.2f deg C/atm/cm**2'%(dt)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the change of temperature in atmosphere drop of pressure is 0.31 deg C/atm/cm**2\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.4 pageno : 241"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "u = 1.08;\n",
      "cp = 8.6;\t    \t        \t#specific heat in kj/kg.K\n",
      "j = 4.2;\t\t    \t        #joules constant in j/cal\n",
      "p1 = 1*1.013*10**6;\t\t\t    #pressure at intial in N/sq.m\n",
      "p2 = 20*1.013*10**6;\t\t\t#pressure at final in N/sq.m\n",
      "\n",
      "# Calculations\n",
      "dh = -u*cp*j*(p1-p2);\t\t\t#change in enthalpy in joules\n",
      "\n",
      "# Result\n",
      "print 'the change in enthalpy is %3.3e joules'%(dh)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the change in enthalpy is 7.508e+08 joules\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.5 pageno : 241"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "tc = 5.26;\t\t\t#critical temperature of the helium in K\n",
      "\n",
      "# Calculations\n",
      "ti = 27*tc/4;\t\t\t#inversion temperature of the helium in K\n",
      "\n",
      "# Result\n",
      "print 'the inversion temperature of the helium is %3.2f K'%(ti)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the inversion temperature of the helium is 35.50 K\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.6 pageno : 241"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "a = 0.245*10**6*10**6;\t\t\t#vanderwaal constant in cm**4.dyne/mole**2\n",
      "b = 2.67*10;\t\t\t#vanderwaal constant in cc/mole\n",
      "r = 2*4.2*10**7;\t\t\t#universal gas constant in ergs/mole.K\n",
      "\n",
      "# Calculations\n",
      "ti = 2*a/(b*r);\t\t\t#inversion temperature in K\n",
      "\n",
      "# Result\n",
      "print 'inversion temperature of hydrogen is %.f K'%(round(ti,-1))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "inversion temperature of hydrogen is 220 K\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.7 pageno : 242"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "dp = 50*10**6;\t\t\t#change in pressure in dynes/sq.cm\n",
      "cp = 7*4.2*10**7;\t\t\t#specific heat constant pressure in ergs/mole.K\n",
      "a = 1.32*10**12;\t\t\t#vanderwaal constant in cm**4.dyne/mole**2\n",
      "b = 31.2;\t\t\t#vanderwaal constant in cm**2/mole\n",
      "t = 300;\t\t\t#inital temperature in K\n",
      "r = 2*4.2*10**7;\t\t\t#ergs/mole.K\n",
      "\n",
      "# Calculations\n",
      "dt = ((2*a/(r*t))-b)*dp/cp;\t\t\t#change in temperature in K\n",
      "\n",
      "# Result\n",
      "print 'the change in temperature is %3.1f K'%(dt)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the change in temperature is 12.5 K\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.8 pageno : 242"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "p1 = 1.;\t\t\t    #inital pressure in atm\n",
      "p2 = 51.;   \t\t\t#final pressure in atm\n",
      "t1 = 300.;\t    \t\t#inital temperature in K\n",
      "y = 1.4;\t\t    \t#coefficient of expansion\n",
      "\n",
      "# Calculations\n",
      "t2 = t1*(p2/p1)**((1-y)/y);\t\t\t#final temperature in K\n",
      "dt = t1-t2;\t                \t\t#drop in temperature in K\n",
      "\n",
      "# Results\n",
      "print 'the drop in temperature is %3.2f K'%(dt)\n",
      "print \"Note : answer is slightly different because of rounding error\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the drop in temperature is 202.45 K\n",
        "Note : answer is slightly different because of rounding error\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}