summaryrefslogtreecommitdiff
path: root/Physical_Chemistry_by_Duffey_George_H/Chapter_1.ipynb
blob: ca5fb73ce05fb94aafd73bb6eab27dc93166c5ce (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
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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
{
 "metadata": {
  "name": "",
  "signature": "sha256:1833f0f72d4fcfdfc05d274c870f8929bea706e80b14f9268d3407df8540de4d"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1 - Kinetic theory of gases and equations of state"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1 - Pg 5"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the final volume of the gas\n",
      "#initialisation of variables\n",
      "V= 22.394 #l\n",
      "m= 32 #gm\n",
      "T= 0 #C\n",
      "T1= 50. #C\n",
      "p= .8 #atm\n",
      "#CALCULATIONS\n",
      "V1= (T1+273.16)*V/(T+273.16)\n",
      "V2= (1./p)*V1\n",
      "#RESULTS\n",
      "print '%s %.3f %s' % (' Volume = ',V2,'lt')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Volume =  33.116 lt\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2 - Pg 7"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate gthe argon temperature\n",
      "#initialisation of variables\n",
      "P= 1 #atm\n",
      "T= 0 #C\n",
      "#CALCULATIONS\n",
      "T1= 10*(T+273.2)\n",
      "#RESULTS\n",
      "print '%s %.1f %s' %(' Argon temperature =',T1,' K')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Argon temperature = 2732.0  K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3 - Pg 9"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Atomic Weight\n",
      "#initialisation of variables\n",
      "x= 0.0820544\n",
      "T= 0 #C\n",
      "l= 1.7826 #gl^-1atm^-1\n",
      "#CALCULATIONS\n",
      "M= x*(273.16+T)*l\n",
      "#RESULTS\n",
      "print '%s %.3f %s' % (' Atomic Weight =',M,'gm mole^-1')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Atomic Weight = 39.955 gm mole^-1\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4 - Pg 11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Molecular weight and molecular formula\n",
      "#initialisation of variables\n",
      "g=.270 #g\n",
      "R=0.08205\n",
      "T=296.4 #K\n",
      "P=754.6/760.0 #atm\n",
      "V=0.03576 #lt\n",
      "m1= 12\n",
      "m2= 19\n",
      "m3= 35.46\n",
      "yx=.57\n",
      "#CALCULATIONS\n",
      "M1=g*R*T/(P*V)\n",
      "y=round(yx*M1/m3)\n",
      "n=round((M1-m3*y+m2)/(2*m2+m1))\n",
      "x=2*n-1\n",
      "M= n*m1+x*m2+y*m3\n",
      "#RESULTS\n",
      "print '%s %.2f %s' %('Approximate molecular weight = ',M1,\"gms\")\n",
      "print '%s %.2f %s' % (' Molecular weight =',M,' gms')\n",
      "print '%s %d %s %d %s %d' %('Molecular formula is C',n,'F',x,'Cl',y)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Approximate molecular weight =  184.94 gms\n",
        " Molecular weight = 187.38  gms\n",
        "Molecular formula is C 2 F 3 Cl 3\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5 - Pg 14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the pressure in both cases\n",
      "#initialisation of variables\n",
      "n= 10 #moles\n",
      "R= 0.08205 #atml/molK\n",
      "T= 300 #K\n",
      "V= 4.86 #l\n",
      "b= 0.0643 #ml mol**-1\n",
      "a= 5.44 #l**2\n",
      "#CALCULATIONS\n",
      "P= n*R*T/V\n",
      "P1= (n*R*T/(V-n*b))-(a*n**2/V**2)\n",
      "#RESULTS\n",
      "print '%s %.1f %s' % (' Pressure in case of perfect gas law=',P,' atm')\n",
      "print '%s %.1f %s' % ('  \\n Pressure in case of vanderwaals equation =',P1,' atm')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Pressure in case of perfect gas law= 50.6  atm\n",
        "  \n",
        " Pressure in case of vanderwaals equation = 35.3  atm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6 - Pg 20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the pressure of the gas\n",
      "#initialisation of variables\n",
      "n= 10 #moles\n",
      "T= 300 #K\n",
      "V= 4.86 #l\n",
      "R= 0.08205 #atml/molK\n",
      "v= 0.1417 #l\n",
      "T1= 305.7 #K\n",
      "#CALCULATIONS\n",
      "b= v/2\n",
      "a= 2*v*R*T1\n",
      "P= ((n*R*T)/(V-n*b))*2.71**(-a*n/(V*R*T))\n",
      "#RESULTS\n",
      "print '%s %.1f %s' % (' Pressure =',P,' atm')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Pressure = 32.8  atm\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7 - Pg 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the root mean square velocity\n",
      "#initialisation of variables\n",
      "import math\n",
      "from math import sqrt\n",
      "T= 0 #C\n",
      "T1= 100 #C\n",
      "R= 8.314 #atm lit/mol K\n",
      "n= 3\n",
      "M= 2.016 #gm\n",
      "M1= 28.02 #gm\n",
      "M2= 146.1 #gm\n",
      "#CALCULATIONS\n",
      "u= sqrt(n*R*10**7*(T+273.2)/M)\n",
      "u1= sqrt(n*R*10**7*(T+273.2)/M1)\n",
      "u2= sqrt(n*R*10**7*(T+273.2)/M2)\n",
      "u3= sqrt(n*R*10**7*(T1+273.2)/M)\n",
      "u4= sqrt(n*R*10**7*(T1+273.2)/M1)\n",
      "u5= sqrt(n*R*10**7*(T1+273.2)/M2)\n",
      "#RESULTS\n",
      "print '%s %.2f %s' % (' root mean square velocity of H2 at 0 C  =',u*10**-4,' cm/sec')\n",
      "print '%s %.3f %s' % (' \\n root mean square velocity of N2 at 0 C=',u1*10**-4,' cm/sec')\n",
      "print '%s %.3f %s' % (' \\n root mean square velocity of SF6 at 0 C =',u2*10**-4,'cm/sec')\n",
      "print '%s %.2f %s' % (' \\n root mean square velocity of H2 at 100 C =',u3*10**-4,' cm/sec')\n",
      "print '%s %.3f %s' % (' \\n root mean square velocity of N2 at 100 C =',u4*10**-4,' cm/sec')\n",
      "print '%s %.3f %s' % (' \\n root mean square velocity of SF6 at 100 C =',u5*10**-4,' cm/sec')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " root mean square velocity of H2 at 0 C  = 18.38  cm/sec\n",
        " \n",
        " root mean square velocity of N2 at 0 C= 4.931  cm/sec\n",
        " \n",
        " root mean square velocity of SF6 at 0 C = 2.160 cm/sec\n",
        " \n",
        " root mean square velocity of H2 at 100 C = 21.49  cm/sec\n",
        " \n",
        " root mean square velocity of N2 at 100 C = 5.764  cm/sec\n",
        " \n",
        " root mean square velocity of SF6 at 100 C = 2.524  cm/sec\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9 - Pg 34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the no. of collisions in He and N2\n",
      "#Initialisation of variables\n",
      "import math\n",
      "from math import sqrt\n",
      "P= 1 #at,\n",
      "T= 300 #K\n",
      "R= 82.05 #atm l/mol K\n",
      "R1= 8.314\n",
      "s= 4*10**-8 #cm\n",
      "s1= 2*10**-8 #cm\n",
      "m= 4 #gm\n",
      "m1= 28 #gm\n",
      "#CALCULATIONS\n",
      "N= P*6.02*10**23/(R*T)\n",
      "n= 2*s1**2*N**2*sqrt(math.pi*R1*10**7*T/m)\n",
      "n1= 2*s**2*N**2*sqrt(math.pi*R1*10**7*T/m1)\n",
      "#RESULTS\n",
      "print '%s %.e %s' % (' no of collisions =',n,'collisions sec^-1 mol^-1')\n",
      "print '%s %.2e %s' % (' \\n no of collisions =',n1,' collisions sec^-1 mol^-1')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " no of collisions = 7e+28 collisions sec^-1 mol^-1\n",
        " \n",
        " no of collisions = 1.01e+29  collisions sec^-1 mol^-1\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10 - Pg 36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the viscosity of N2\n",
      "#initialisation of variables\n",
      "import math\n",
      "from math import sqrt\n",
      "M= 28 #gm\n",
      "R= 8.314*10**7 #atm l/mol K\n",
      "N= 6.023*10**23\n",
      "T= 300 #K\n",
      "s= 4*10**-8#cm\n",
      "#CALCULATIONS\n",
      "m= M/N\n",
      "k= R/N\n",
      "n= (5./16.)*sqrt(math.pi*m*k*T)/(math.pi*s**2)\n",
      "#RESULTS\n",
      "print '%s %.2e %s' % (' viscosity =',n,'poise')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " viscosity = 1.53e-04 poise\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12 - Pg 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Increase in energy per degree for 1 mole of gas\n",
      "#initialisation of variables\n",
      "n= 3\n",
      "R= 2 #cal mol^-1 deg^-1\n",
      "#CALCULATIONS\n",
      "I= n*R\n",
      "#RESULTS\n",
      "print '%s %.1f %s' %(' Increase in energy =',I,'cal mol^-1 deg^-1')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Increase in energy = 6.0 cal mol^-1 deg^-1\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13 - Pg 51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Dipole moment and percentage of ionic character\n",
      "#initialisation of variables\n",
      "import math\n",
      "k= 1.38*10**-16\n",
      "N= 6*10**23 #molecules\n",
      "a= 105 #degrees\n",
      "l= 0.957 #A\n",
      "e= 4.8*10**-10 #ev\n",
      "#CALCULATIONS\n",
      "u= math.sqrt(9*k*2.08*10**4/(4*math.pi*N))\n",
      "uh= u/(2*math.cos(a*math.pi/180/2.))\n",
      "z= uh/(l*e*10**-8) \n",
      "#RESULTS\n",
      "print '%s %.2e %s' % (' Dipole moment of H2O=',u,'e.s.u.cm')\n",
      "print '%s %.2e %s' % (' \\n Dipole moment of OH bond =',uh,'e.s.u.cm')\n",
      "print '%s %.2f' % (' \\n fraction of ionic character =',z)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Dipole moment of H2O= 1.85e-18 e.s.u.cm\n",
        " \n",
        " Dipole moment of OH bond = 1.52e-18 e.s.u.cm\n",
        " \n",
        " fraction of ionic character = 0.33\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14 - Pg 52"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the dielectric constant\n",
      "#initialisation of variables\n",
      "import math\n",
      "u= 1.44*10**-18 #e.s.u\n",
      "k= 3.8*10**-16 \n",
      "T= 273. #k\n",
      "N= 6.023*10**23 #molecules\n",
      "v= 6. #cc\n",
      "Vm= 44.8*10**3 #cc\n",
      "#CALCULATIONS\n",
      "Pm= v+(4*math.pi*N*u**2/(3*3*k*T))\n",
      "r= Pm/Vm\n",
      "k= (2*r+1)/(1-r)\n",
      "#RESULTS\n",
      "print '%s %.5f' % (' dielectric constant =',k)\n",
      "print 'The answer is a bit different due to rounding off error in textbook'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " dielectric constant = 1.00153\n",
        "The answer is a bit different due to rounding off error in textbook\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}